23.11.17 16:30, Paul Moore пише:
Ok, cool. My main point still applies though - has anyone confirmed
why a function scope was considered necessary at the time of the
original implementation, but it's apparently not now? I'm pretty sure
it was a deliberate choice, not an accident.

The implementation with an intermediate one-time function is just simpler. The one of purposes of Python 3 was simplifying the implementation, even at the cost of some performance penalty. I'm pretty sure the corner case with "yield" was just missed.

_______________________________________________
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

Reply via email to