Re: [Python-ideas] Proposal to change List Sequence Repetition (*) so it is not useless for Mutable Objects

June 1, 2016
6:49 a.m.
I could see the use of the operator '@' to construct a matrix, perhaps. It is more limited though (essentially a 2D version of sequence repetition). Semantically, it would seem to me intuitive that [Foo()] * N would create a list of N Foos, not a list of N references to the same Foo. I can see that people who are used to how it actually works now would have issues with such a change in the semantics, however. Didn't consider the zip(*[it]*3) case being broken, I admit.
3182
Age (days ago)
3182
Last active (days ago)
0 comments
1 participants
participants (1)
-
Matthew Tanous