Emanuel Barry added the comment: 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?"). ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27135> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com