• Guido van Rossum's avatar
    Add warning that mutable argument defaults are evaluated only once; · aee5e26f
    Guido van Rossum yazdı
    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.
    aee5e26f
tut.tex 132 KB