[issue18001] TypeError: dict is not callable in ConfigParser.py

Ethan Furman report at bugs.python.org
Fri May 17 23:10:22 CEST 2013


Ethan Furman added the comment:

Your interest if fixing Python is appreciated, but you need to verify that a bug actually exists first:

Python 2.7.3 (default, Sep 26 2012, 21:51:14) 
[GCC 4.7.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
--> class RawConfigParser:
...     def __init__(self, defaults=None, dict_type=dict):
...         self._dict = dict_type
...         self._sections = self._dict()
...         self._defaults = self._dict()
... 
--> rcp = RawConfigParser()
--> rcp._sections
{}
--> type(rcp._sections)
<type 'dict'>
--> rcp._sections['test'] = 'hello, world!'
--> rcp._sections
{'test': 'hello, world!'}

As you can see, it is indeed callable and does result in a dictionary.

----------
resolution:  -> invalid
status: open -> closed

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


More information about the Python-bugs-list mailing list