title: hasattr on class names
body: <p><a href="https://docs.python.org/2/library/functions.html#hasattr" rel="nofollow">hasattr</a> documentation says that it takes an object and an attribute name and lets you know if that attribute exists on that object.</p>
  
  <p>I have discovered that it seems to work on class names too (i.e. not an instance object).</p>
  
  <p>Something like:</p>
  
  <pre><code>class A:
      def Attr1(self):
          pass
  
  &gt; hasattr(A, 'Attr1')
  True
  &gt; 
  </code></pre>
  
  <p>I would like to use this to make some test code easier to write, but don't want to be bitten later in case this is a side effect of the implementation and not really intended. </p>
  
  <p><sub>Please don't ask to see the test code to see if I can do something else, as that is not really the question.</sub></p>
  
  <p>Is there any official python stance on this? I presume the object referred to, in the documentation is talking about an instance object.</p>
  
  <p>I tried googling (and looking at some questions in StackOverflow), but didn't seem to find anything.</p>