Skip to content

Instantly share code, notes, and snippets.

@adrianmarkperea
Created October 13, 2019 03:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrianmarkperea/256074c370db22a1855f68f6349e921a to your computer and use it in GitHub Desktop.
Save adrianmarkperea/256074c370db22a1855f68f6349e921a to your computer and use it in GitHub Desktop.
a = 1 # namespace {a: 1}
# does `a` exist in the namespace? Yes!
# proceed without error
print(a) # => 1
# does `b` exist in the namespace? No.
# Throw a `NameError`
print(b) # => NameError: name `b` is not defined.
b = 16 # namespace {a: 1, b: 16}
# no more problems!
print(b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment