On Wed, Jan 2, 2013 at 1:16 PM, Oleg Broytman
On Wed, Jan 02, 2013 at 11:07:58AM +1000, Nick Coghlan
wrote: Mutable default arguments make perfect sense once you understand the difference between compile time, definition time and execution time for a function. Defaults are evaluated at definition time, thus they are necessarily shared across all invocations of the function.
I.e., users have to understand the current implementation. Mutable defaults are not a language design choice, they are dictated by the implementation, right?
No, they're not an implementation accident, they're part of the language design. It's OK if you don't like them, but please stop claiming they're a CPython implementation artifact. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia