title: How to get a complete list of object's methods and attributes?
body: <pre><code>dir(re.compile(pattern)) 
  </code></pre>
  
  <p>does not return pattern as one of the lists's elements. Namely it returns:</p>
  
  <pre><code>['__copy__', '__deepcopy__', 'findall', 'finditer', 'match', 'scanner', 'search', 'split', 'sub', 'subn']
  </code></pre>
  
  <p>According to the manual, it is supposed to contain </p>
  
  <blockquote>
    <p>the object's attributes' names, the
    names of its class's attributes, and
    recursively of the attributes of its
    class's base classes.</p>
  </blockquote>
  
  <p>It says also that</p>
  
  <blockquote>
    <p>The list is not necessarily complete.</p>
  </blockquote>
  
  <p>Is there a way to get the <strong>complete</strong> list? I always assumed that dir returns a complete list but apparently it does not...</p>
  
  <p>Also: is there a way to list only attributes? Or only methods?</p>
  
  <p><em>Edit: this is actually a bug in python -> supposedly it is fixed in the 3.0 branch (and perhaps also in 2.6)</em></p>