Georg Brandl <ge...@python.org> added the comment: This is by design. Parameter default values are evaluated when the function is defined, not when it is called. Therefore, by assigning the default value to an instance attribute, you are basically sharing it between instances.
---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9703> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com