What’s the uninitialized value in Python, so I can compare if something is initialized, like:
val if val == undefined ?
EDIT: added a pseudo keyword.
EDIT2: I think I didn’t make it clear, but say val is already there, but nothing is assigned to it.
Will throw a
NameErrorexception:You can either catch that or use
'val' in dir(), i.e.:or