Re:Python's Mutable Default Problem
by riobard on Sunday February 20, 2011 @01:03PM
(#2242510)
You just need to fully understand when Python does evaluation.
In Scala it has a better syntax because of typed function object:
the `default` parameter is a function, so when you do
The `defaultValue` becomes a function that generates the value you put there when called.
[ Parent
| on HN ]
There are no comments on this comment yet.