commit | aee5e26f4b917d2db2e255a3b86f70d747386763 | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Fri Aug 07 17:45:09 1998 +0000 |
committer | Guido van Rossum <guido@python.org> | Fri Aug 07 17:45:09 1998 +0000 |
tree | cc1b305ac162b2853faff244f550add4677b8d87 | |
parent | 1a0b87266540c6da06d3dd62248b1a4be660631a [diff] |
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.