define-a-scope-anywhere-in-python
Published at 2024-01-26
Last update over 365 days ago
Licensed under CC BY-NC-SA 4.0
temporary scope
langs
python
ref: https://stackoverflow.com/questions/8046142/can-i-define-a-scope-anywhere-in-python
NO
Substitution:
def f():
...
f()
try:
a = 1
b = 2
finally:
del a
del b