[New-bugs-announce] [issue35954] Incoherent type conversion in configparser

Adeokkuw report at bugs.python.org
Sun Feb 10 07:28:34 EST 2019


New submission from Adeokkuw <stephanmonecke at gmail.com>:

configparser interface implicitly converts all objects to str (read_dict [sic] on line 724 of "3.7/Lib/configparser.py") while saving but not while lookup (__getitem__ on line 956).

MWE:

```
config = configparser.ConfigParser()
config[123] = {}
print(config[123])
```
~> KeyError: 123

----------
components: Library (Lib)
messages: 335150
nosy: Adeokkuw
priority: normal
severity: normal
status: open
title: Incoherent type conversion in configparser
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35954>
_______________________________________


More information about the New-bugs-announce mailing list