[New-bugs-announce] [issue18001] TypeError: dict is not callable in ConfigParser.py

Charles Henry report at bugs.python.org
Fri May 17 21:49:55 CEST 2013


New submission from Charles Henry:

Python 2.6 and 2.7 each have a bad definition of the class RawConfigParser
It is immediately apparent in the __init__ function which begins with:

class RawConfigParser:
    def __init__(self, defaults=None, dict_type=dict):
        self._dict = dict_type
        self._sections = self._dict()
        self._defaults = self._dict()

Clearly, _dict() is not a function.  _dict is not even properly defined as a public or private member of the RawConfigParser class.

The fix is to add a private variable to the class and a function for retrieving the value.

----------
components: Library (Lib)
messages: 189480
nosy: czhenry
priority: normal
severity: normal
status: open
title: TypeError: dict is not callable in ConfigParser.py
versions: Python 2.6, Python 2.7

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


More information about the New-bugs-announce mailing list