Typo in Glossary entry for "generator iterator"?

I was looking at the glossary to base some educational material when I found the “generator iterator” definition:

Each yield temporarily suspends processing, remembering the location execution state (including local variables and pending try-statements).

I find it hard to parse the first sentence, particularly “the location execution state”. I do know how a generator works, but I’m unsure if this is attempting to say “location and execution state”, “local execution state,” or something else. I am not a native English speaker, but the three nouns on a row are challenging for me to read (if it is a noun phrase, shouldn’t they be dashed?)

Note: The phrase appears again in the “asynchronous generator iterator” entry.

1 Like

I’m not sure whether there’s some history behind this wording (maybe check git blame), but the sentence would read better to me if the word “location” was removed: on yield, the generator remembers the execution state.

4 Likes

It really looks like a typo for local!
«remembering local execution state» makes sense to me: the suspended generator remembers where it is (in the middle of a loop etc), and keeps the values of local variables. The global execution state is another concept.

1 Like