Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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
You can’t perform that action at this time.