title: Understanding type of object in Python
body: <p>I've always programmed in C++ and now I'm learning Python. 
  I find very confusing the absence of declaration of objects in Python, especially the fact that members of classes are not declared before being defined. </p>
  
  <p>For example in C++ I would write:</p>
  
  <pre><code>Class ComplexNumber {
      protected:
      int _re,_im;
  
      public:
      ...
  
  }
  </code></pre>
  
  <p>In Python the declaration of _re and _im would be missing and their initialization would be hidden in the definition of public members. When you are lucky you find them in the constructor, but sometimes they are initialized in other members.</p>
  
  <p>Is there any method to figure out the complete structure of classes in Python without reading the whole code? In particular I'm interested in the full list of the "variables" (and their types) contained in the classes, which in C++ are usually protected/private members.</p>
  
  <p>Thank you in advance.</p>