On Tue, Jul 19, 2016 at 2:58 PM, Rustom Mody <rustompm...@gmail.com> wrote: > Analogy: > Mutable default parameters are a source of problem and confusion. > > No A says. One can use them to simulate statics > > No B says No problem as long as you make sure there is no mutation to the > mutable, either inside or outside the function. > > Sure thats all true. However > "Module-globals” is a simpler answer than A > And “DON’T” is simpler than B > > So awaiting your preferred myth-ology…
Preferred: Understand what's going on. Unless you're talking to a novice/student programmer (in which case "Oh, don't do that - ask me about it later when we're not busy fixing this problem" is a valid response), it's best that people understand what they're working with. ChrisA -- https://mail.python.org/mailman/listinfo/python-list