New submission from Bar Harel: I have encountered a weird behavior in collections.UserList. Using copy.copy() on an instance results in a new instance of UserList but with the same underlying list. Seems like self.copy() works great but __copy__ was not overridden to allow copy.copy to work too. The patch just assigns __copy__ to self.copy triggering the correct behavior.
---------- components: Library (Lib) files: UserList.patch keywords: patch messages: 266515 nosy: bar.harel priority: normal severity: normal status: open title: Fix collections.UserList shallow copy type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6 Added file: http://bugs.python.org/file43032/UserList.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27141> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com