
June 16, 2011
11:45 p.m.
Alex Light dixit (2011-06-16, 13:21):
my best guess is that to implement this we would need to slightly redefine the way that python looks up variables by making it look in a special 'injected' dictionay after looking through locals and before globals.
But one of the default-argument-hack reasons is to optimize variable access by avoid dictionary loopup (locals are not dictionary-based). I'd rather stick to the implementation sketch described by Nick (changing the syntax a bit; as I said, imho @keyword... should be placed before function def). Cheers. *j