side effects on *some* default parameters
Michael Hudson
mwh at python.net
Thu Feb 13 08:20:07 EST 2003
Jp Calderone <exarkun at intarweb.us> writes:
[why are argument defaults only evaluated once]
> The actual reason is unknown to me, and may be as simple as "it is easier
> to implement" or "I [Guido] like it this way".
I think there would be nasties in the issue of the scope the defaults
got evaluated in.
Cheers,
M.
--
But since I'm not trying to impress anybody in The Software Big
Top, I'd rather walk the wire using a big pole, a safety harness,
a net, and with the wire not more than 3 feet off the ground.
-- Grant Griffin, comp.lang.python
More information about the Python-list
mailing list