
On Sat, Jun 11, 2011 at 11:30 PM, Jan Kaliszewski <zuo@chopin.edu.pl> wrote:
1. To add a new keyword, e.g. `inject': def do_and_remember(val, verbose=False): inject mem = collections.Counter() ... or maybe: def do_and_remember(val, verbose=False): inject collections.Counter() as mem ...
This particular alternative to the default argument hack has come up before, as has the "hidden parameters after '**'" approach. (I thought there was a PEP on this, but I can't find anything other than the reference in the description of Option 4 in PEP 3103 - however, there is a thread on the topic that starts as part of the PEP 3103 discussion at http://mail.python.org/pipermail/python-dev/2006-June/066603.html) Institutional-memory'ly yours, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia