[Python-Dev] Scope issues [was: Alternative forms [was: PEP 463: Exception-catching expressions]]
On Fri Mar 7 20:54:31 CET 2014, Chris Angelico wrote: On Sat, Mar 8, 2014 at 5:58 AM, Jim J. Jewett jimjjewett at gmail.com wrote: (Thu Mar 6 23:26:47 CET 2014) Chris Angelico responded: ...[as-capturing is] deferred until there's a non-closure means of creating a sub-scope. The problem is that once it is deployed as leaking into the parent scope, backwards compatibility may force it to always leak into the parent scope. (You could document the leakage as a bug or as implementation-defined, but ... those choices are also sub-optimal.) It'll never be deployed as leaking, for the same reason that the current 'except' statement doesn't leak: I don't think that is the full extent of the problem. From Nick's description, this is a nasty enough corner case that there may be glitches no one notices in time. The PEP should therefore explicitly state that implementation details may force the deferral to be permanent, and that this is considered an acceptable trade-off. -jJ -- Sorry for the botched subject line on the last previous message. If there are still threading problems with my replies, please email me with details, so that I can try to resolve them. -jJ ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] Scope issues [was: Alternative forms [was: PEP 463: Exception-catching expressions]]
On Mon, Mar 10, 2014 at 1:35 PM, Jim J. Jewett jimjjew...@gmail.com wrote: The PEP should therefore explicitly state that implementation details may force the deferral to be permanent, and that this is considered an acceptable trade-off. How about words to this effect? Should there be, in future, a way to create a true subscope (which could simplify comprehensions, except expressions, with blocks, and possibly more), then this proposal could be revived; until then, its loss is not a great one... (I parked the time machine in the PSU's garage, thanks for lending me it!) (The PSU does not exist, and therefore does not have a garage.) ChrisA ___ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com