How do you know whether a variable has been set at a particular place in the code at runtime? This is not always obvious because (1) the variable could be conditionally set, and (2) the variable could be conditionally deleted. I'm looking for something like defined() in Perl or isset() in PHP or defined? in Ruby.
if condition:
a = 42
# is "a" defined here?
if other_condition:
del a
# is "a" defined here?
importto "source" a "config file" (i.e. a file that only has assignments in it), it may very well be that some variable has not been defined there. Andimportis sure cheaper/simpler thanConfigParser, so for me pragmatism wins over beauty here.