munificent / craftinginterpreters

Repository for the book "Crafting Interpreters"
http://www.craftinginterpreters.com/
Other
8.99k stars 1.05k forks source link

Incorrect information in Chapter 8 #925

Closed Gaming32 closed 3 years ago

Gaming32 commented 3 years ago

At the end of chapter 8, you say:

In Python, you may want to assign to some variable outside of the current function instead of creating a new variable in the current one, but you can’t.

In Python, you can use nonlocal to create certain variables in the enclosing scope or global to create a variable in the current module's global scope.

Gaming32 commented 3 years ago

Why do I keep making issues just to be proven that I shouldn't within the next few paragraphs? Maybe I just want to be part of a big project like this.