This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author surkamp
Recipients surkamp
Date 2010-08-19.18:42:07
SpamBayes Score 0.00095400406
Marked as misclassified No
Message-id <1282243330.02.0.3448153911.issue9646@psf.upfronthosting.co.za>
In-reply-to
Content
The documentation states that the default value of function parameter, if mutable, can change it's default value at runtime due to be evaluated only once on function object creation.

I would like to suggest the inclusion of an default language warning when this kind of construction is used, as it's Python specific behavior and can lead to "strange behavior" or misuse by programmers that are migrating from other languages to Python.

Documentation reference:
http://docs.python.org/reference/compound_stmts.html#function
History
Date User Action Args
2010-08-19 18:42:11surkampsetrecipients: + surkamp
2010-08-19 18:42:10surkampsetmessageid: <1282243330.02.0.3448153911.issue9646@psf.upfronthosting.co.za>
2010-08-19 18:42:08surkamplinkissue9646 messages
2010-08-19 18:42:08surkampcreate