I want to check if a variable exists.
(我想检查一个变量是否存在。)
Now I'm doing something like this:(现在我正在做这样的事情:)
try:
myVar
except NameError:
# Do something.
Are there other ways without exceptions?
(是否有其他方法无一例外?)
ask by Max Frai translate from so