[New-bugs-announce] [issue5807] ConfigParser.RawConfigParser it's an "old-style" class

Vito De Tullio report at bugs.python.org
Tue Apr 21 17:12:43 CEST 2009


New submission from Vito De Tullio <vito.detullio at gmail.com>:

RawConfigParser does not inherit from object, so using (to make an
example) super() it's impossible.

Python 2.6 (r26:66714, Feb  3 2009, 20:52:03)
[GCC 4.3.2 [gcc-4_3-branch revision 141291]] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from ConfigParser import RawConfigParser
>>> class MyConfigParser(RawConfigParser):
...     def __init__(self):
...         super(MyConfigParser, self).__init__()
...
>>> mcp = MyConfigParser()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 3, in __init__
TypeError: super() argument 1 must be type, not classobj
>>>

----------
components: Library (Lib)
messages: 86232
nosy: ZeD
severity: normal
status: open
title: ConfigParser.RawConfigParser it's an "old-style" class
versions: Python 2.6

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5807>
_______________________________________


More information about the New-bugs-announce mailing list