Nick Coghlan wrote: > Then all the two new opcodes (e.g. ALLOW_ASYNC, BLOCK_ASYNC) would > have to do is set the state of tstate->allow_async_exc appropriately.
Actually, to allow the use of 'with' statements inside functions called via EXPR and the call to __enter__, it would be necessary to support nesting of calls to BLOCK_ASYNC and ALLOW_ASYNC, so a better approach would be to make the field "tstate->block_async_exc", incrementing it in BLOCK_ASYNC, and decrementing it in ALLOW_ASYNC. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --------------------------------------------------------------- http://boredomandlaziness.blogspot.com _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com