Re:Python's Mutable Default Problem
by dilap on Sunday February 20, 2011 @04:59PM
(#2243258)
It's sad that such a common and concise idiom as "x or y" is so perniciously, subtly broken in Python, and that there is no satisfyingly concise equivalent.
If I were being cavalier and had an extra wish to burn, I'd request
If I were being cavalier and had an extra wish to burn, I'd request
to mean x unless x is None.