[issue27135] nested list produced with multiplication is linked to the same list

Matthew Tanous report at bugs.python.org
Fri May 27 02:57:59 EDT 2016


Matthew Tanous added the comment:

I'm aware that it's how Python works at present. My point was that this is awkward and counter-intuitive, with no purpose I can see worth serving.

"That's just how it works" seems to me a rather insufficient answer, especially for such a seemingly trivial change.

So, no, it's not technically a bug. But I think it's worth some discussion.

> On May 26, 2016, at 11:42 PM, Benjamin Peterson <report at bugs.python.org> wrote:
> 
> 
> Benjamin Peterson added the comment:
> 
> That's just how Python works. https://docs.python.org/3/faq/programming.html#how-do-i-create-a-multidimensional-list
> 
> ----------
> nosy: +benjamin.peterson
> resolution:  -> not a bug
> status: open -> closed
> 
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue27135>
> _______________________________________

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27135>
_______________________________________


More information about the Python-bugs-list mailing list