title: Python 2 & 3 compatibility with `super` and classes who were old-style in Py2 but became new-style in Py3
body: <p>I have <a href="https://github.com/exhuma/config_resolver" rel="noreferrer">a project</a> which uses <code>SafeConfigParser</code> and I want it to be Python2 and 3 compatible. Now, <code>SafeConfigParser</code> is deprecated since Python 3.2 and I find the deprecation warning annoying. So I went about my business to remedy that.</p>
  
  <p>First (and much older, already solved problem): <code>SafeConfigParser</code> is an old-style class in Python2 so I cannot call <code>super</code> in my descendant class. To have a more consistent behaviour, I wrote the following:</p>
  
  <pre><code>try:
      # Python 2
      class ConfigResolverBase(object, SafeConfigParser):
          """
          A default "base" object simplifying Python 2 and Python 3
          compatibility.
          """
          pass
  except TypeError:
      # Python 3
      class ConfigResolverBase(SafeConfigParser):
          """
          A default "base" object simplifying Python 2 and Python 3
          compatibility.
          """
          pass
  </code></pre>
  
  <p>This worked fine to make the class new-style if necessary. To get rid of the <code>DeprecationWarning</code> I changed the code into this:</p>
  
  <pre><code>if sys.hexversion &lt; 0x030000F0:
      # Python 2
      class ConfigResolverBase(object, SafeConfigParser):
          """
          A default "base" object simplifying Python 2 and Python 3
          compatibility.
          """
          pass
  else:
      # Python 3
      class ConfigResolverBase(ConfigParser):
          """
          A default "base" object simplifying Python 2 and Python 3
          compatibility.
          """
          pass
  </code></pre>
  
  <p>Along the way I also fixed a line I missed to change earlier:</p>
  
  <pre><code>@@ -275,7 +276,7 @@ class Config(ConfigResolverBase):
               have_default = False
  
           try:
  -            value = SafeConfigParser.get(self, section, option, **kwargs)
  +            value = super(Config, self).get(section, option, **kwargs)
               return value
           except (NoSectionError, NoOptionError) as exc:
               if have_default:
  </code></pre>
  
  <p>And <em>that</em> change caused an interesting error:</p>
  
  <pre><code>AttributeError: 'Config' object has no attribute '_sections'
  </code></pre>
  
  <p>Which let me to believe that <code>__init__</code> of <code>ConfigParser</code> was not called. And indeed making the following change fixed that:</p>
  
  <pre><code>- class ConfigResolverBase(object, SafeConfigParser):
  + class ConfigResolverBase(SafeConfigParser, object):
  </code></pre>
  
  <p>My code is now working fine for both Python 2 and 3, but whant I am unsure about is: Is the proxy returned by <code>super</code> always the same?" In my case I inherit from both <code>object</code> and <code>SafeConfigParser</code>. Swapping the two bases in my class definition made <code>super</code> return the right one. But is this guaranteed to be stable across all Python implementations on all platforms? Or should I explicitly call <code>SafeConfigParser.get(self, ...)</code>? Which is after-all the "old way" of calling the base...</p>