SilentGhost added the comment: Because elements of the tab list are the same list. And since list is a mutable type, modifying list object will be visible to via all the reference / names that point to that object. There are various ways to work around this behaviour, typically a list comprehension is used.
P.S. Please don't add spurious components to the issue, it adds people to the nosy list. ---------- components: -IDLE, Macintosh nosy: +SilentGhost resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27668> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com