Worth looking at is the thread:
http://groups-beta.google.com/group/comp.lang.python/browse_thread/thread/58f53fe8bcc49664/
Huh - I thought I put something in the original post saying "without resorting to bytecode hacks", but I must have deleted it before sending the message.
Anyway, that thread is what the comment about bytecode hacks would have been referring to :)
Although, once the AST compiler goes in, if the AST for a function is attached via a special attribute like __ast__, then perhaps such manipulations could be rewritten to work on the AST instead of the bytecode. If that happens, they might become less hackish.
So I guess I should wait and see what the next few months holds in terms of AST-hacks :)
Cheers, Nick.
-- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- http://boredomandlaziness.skystorm.net -- http://mail.python.org/mailman/listinfo/python-list