News for hackers. Stuff that matters.
Re:Python's Mutable Default Problem by eru on Sunday February 20, 2011 @05:18PM (#2243322)
Make yourself a function.
Re:Python's Mutable Default Problem by dilap on Sunday February 20, 2011 @06:20PM (#2243484)
Not so helpful in a strict language (since you want y to be evaluated only when x is None)
Re:Python's Mutable Default Problem by eru on Monday February 21, 2011 @04:28AM (#2244840)
Yes, that's true. You would need to wrap it in a lambda, but then that's looks horrible and you might as well use an if.