A method for replacing Python tuple entries
A method for replacing Python tuple entries
Posted Mar 26, 2022 1:23 UTC (Sat) by flussence (guest, #85566)Parent article: A method for replacing Python tuple entries
The way Raku does this is to leave the list type immutable, but the contents can be (usually are) boxed scalars, which are mutable unto themselves. It doesn't break the composite type's contract but still achieves the desired result here. Probably not feasible for Python to just copy that idea though…