This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author abarry
Recipients Matthew Tanous, abarry, benjamin.peterson
Date 2016-05-27.20:59:09
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1464382749.72.0.73246620934.issue27135@psf.upfronthosting.co.za>
In-reply-to
Content
You do raise a valid point, sequence repetition (*) on lists of mutable objects serves very little purpose. However, as I stated, it is a side-effect of the data model and changing it would be yet another special case, which aren't special enough to break the rules, and this applies here.

Keep in mind that, currently, this is only confusing to newbies. Your idea would make this confusing for long-time Python programmers.

If you still wish to propose such a change, I recommend to take this to the Python-ideas mailing list (point to this issue in your email). Be warned though that most core developers (and most non-core devs such as myself) will probably prefer the statu quo, again because the change would be yet another special case, and probably view this as an attractive nuisance ("Why does [[x] * y] * n create separate lists but x = y = [] refer to the same list?").
History
Date User Action Args
2016-05-27 20:59:09abarrysetrecipients: + abarry, benjamin.peterson, Matthew Tanous
2016-05-27 20:59:09abarrysetmessageid: <1464382749.72.0.73246620934.issue27135@psf.upfronthosting.co.za>
2016-05-27 20:59:09abarrylinkissue27135 messages
2016-05-27 20:59:09abarrycreate