Message114394
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 |
|
Date |
User |
Action |
Args |
2010-08-19 18:42:11 | surkamp | set | recipients:
+ surkamp |
2010-08-19 18:42:10 | surkamp | set | messageid: <1282243330.02.0.3448153911.issue9646@psf.upfronthosting.co.za> |
2010-08-19 18:42:08 | surkamp | link | issue9646 messages |
2010-08-19 18:42:08 | surkamp | create | |
|