Skip to content

Instantly share code, notes, and snippets.

@JCharante
Created November 17, 2023 11:51
Show Gist options
  • Save JCharante/15db46bef468bfcd2fbad2ea92f98b7e to your computer and use it in GitHub Desktop.
Save JCharante/15db46bef468bfcd2fbad2ea92f98b7e to your computer and use it in GitHub Desktop.

nonlocal

I've bene using Python 3 since I guess 2015 (circa python 3.4.x) and I knew about the global keyword, but not until this year did I learn about the nonlocal keyword (which accomplishes what global does but for a smaller scope).

I just think it's great that after 9 happy years together I can still learn about language features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment