"Scope of Variables in Python" - A full scoop of python scopes!
2019-06-04, 16:00–16:25, Main Hall

In this talk I'll present the python scope of variables, global, nonlocal, closures, LEGB rule and some known and less-known gotcha's of python scopes! attending this talk will might result a small headache ;)


Brief recap of all known python scopes and example:

  • local variables
  • nonlocal keyword
  • global keyword
  • closures
  • LEGB rule
  • generators/coroutines implications
  • gotcha's and unicorns
  • dis module (needed for the next part)

I'll walk-through actual code real world buggy code snippets . showing dis usage on code examples and how to understand whats going on. a recap of each CPython scope implementation will be given.