On Jun 20, 10:57 pm, Ian Kelly <ian.g.ke...@gmail.com> wrote: > If > the goal is indeed to make the the functions more functional, then the > proper solution would be to keep the binding early but just disallow > mutable defaults altogether -- which is tricky to achieve in Python, > so we simply emulate it with the advice "don't use mutable function > defaults".
Nicely put. "Imperative programming is a bad idea; FP is a good idea" is an attractive religious dogma. When put into practice with full religious zeal, we then need something like monads to make realistic programming possible. Which then becomes a case of "remedy worse than disease". Which is why I prefer to keep FP in the limbo region between ideology and technology -- http://mail.python.org/mailman/listinfo/python-list