title: Python: check if object exists in scope
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/843277/python-checking-variable-existing">Python - checking variable existing</a>  </p>
  </blockquote>
  
  
  
  <p>Is there an efficient, simple and pythonic way to check if an object exists in the scope?</p>
  
  <p>In Python everything's an object (variables, functions, classes, class instances etc), so I'm looking for a generic existence test for an object, no matter what it is.</p>
  
  <p>I half expected there to be an <code>exists()</code> <a href="http://docs.python.org/library/functions.html#" rel="noreferrer">built-in function</a>, but I couldn't find any to fit the bill.</p>