summaryrefslogtreecommitdiffstats
path: root/Grammar
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1998-08-07 17:45:09 (GMT)
committerGuido van Rossum <guido@python.org>1998-08-07 17:45:09 (GMT)
commitaee5e26f4b917d2db2e255a3b86f70d747386763 (patch)
treecc1b305ac162b2853faff244f550add4677b8d87 /Grammar
parent1a0b87266540c6da06d3dd62248b1a4be660631a (diff)
downloadcpython-aee5e26f4b917d2db2e255a3b86f70d747386763.zip
cpython-aee5e26f4b917d2db2e255a3b86f70d747386763.tar.gz
cpython-aee5e26f4b917d2db2e255a3b86f70d747386763.tar.bz2
Add warning that mutable argument defaults are evaluated only once;
with examples and workaround. This keeps coming up, and I believe that this section in the tutorial may have been (in part) the source of the confusion. While it didn't show examples with [] for a default, it also didn't emphasize enough why that would be a bad idea, and while it did say that defaults are evaluated at the point of function definition, the example was not relevant for this issue.
Diffstat (limited to 'Grammar')
0 files changed, 0 insertions, 0 deletions