On Sun, Oct 23, 2016 at 6:15 AM, Steve D'Aprano <steve+pyt...@pearwood.info> wrote: > On Sun, 23 Oct 2016 01:15 pm, eryk sun wrote: > >> I meant the behavior seems to have been copied to align with generator >> expressions, even though the cited rationale doesn't apply. I'm not >> saying this is wrong. It's useful that the expression for the outer >> iterator is evaluated in the defining scope. However, it's only >> documented for generator expressions, in 6.2.8. The documentation for >> comprehensions in 6.2.4 makes no mention of it. > > 6.2.8? 6.2.4? What are these references to?
They're section numbers in the Python 3 language reference. Chapter 6 covers expressions. https://docs.python.org/3/reference/expressions -- https://mail.python.org/mailman/listinfo/python-list