Default Value

Lefavor, Matthew (GSFC-582.0)[MICROTEL LLC] matthew.lefavor at nasa.gov
Fri Jun 21 14:44:29 EDT 2013


> ============================================================
> The Apathetic Approach:
> ============================================================
> I could just assume that a programmer is responsible for the
> code he writes. If he passes mutables into a function as
> default arguments, and then mutates the mutable later, too
> bad, he'll understand the value of writing solid code after
> a few trips to exception Hell.

Congratulations, you just summarized exactly what Python does, and exactly the coding style that the Python documents recommend.


More information about the Python-list mailing list