Bizarre behavior with mutable default arguments
Steven D'Aprano
steve at REMOVE-THIS-cybersource.com.au
Sun Dec 30 18:34:07 EST 2007
On Sun, 30 Dec 2007 12:41:57 -0800, bukzor wrote:
> BTW, it's silly not to 'allow' globals when they're called for,
> otherwise we wouldn't need the 'global' keyword.
Nobody argues against allowing globals variables *when they're called
for*, just pointing out that ninety-nine times out of a hundred, people
use them when they're not called for and are positively harmful.
And according to functional programmers, they're NEVER called for.
--
Steven.
More information about the Python-list
mailing list