Christian Heimes [EMAIL PROTECTED] added the comment:
No, it is NOT a bug. The behavior will NOT chance. I'm marking this bug
as a documentation issue.
--
assignee: - georg.brandl
components: +Documentation -Interpreter Core
nosy: +georg.brandl
versions: +Python 2.6, Python 2.7, Python
Grégoire Weber [EMAIL PROTECTED] added the comment:
I'd like to second rhr. The current behaviour is is not according to
Pythons design principle of least surprise. After 5+ years of Python
experience as Zope and Plone developer I recently fell into that trap.
-
Just for information
David W. Lambert [EMAIL PROTECTED] added the comment:
Mutable function arguments and class variables are python's mechanisms
to provide data persistence at these scope levels. Quite opposite of
design flaw, they are necessary! Write a decorator to change the
behavior where you'd like an
Martin v. Löwis [EMAIL PROTECTED] added the comment:
I don't see the need to do anything about this. Python works correctly,
and the documentation correctly describes how it works, and how using
mutable objects as default values typically doesn't do what the
programmer normally expects.
In any