Hi, I noticed configparser does behave in a surprising way when a key has a special meaning in ini-format. Consider this example: >>> cp = configparser.ConfigParser() >>> cp.read_dict({'DEFAULT': {';foo': 'bar'}}) >>> cp.write(sys.stdout) [DEFAULT] ;foo = bar Now when reading this again, ";foo = bar" will be a comment and ignored. There's probably similiar behaviour in other corner cases (like if you'd use "[foo]" as key for example). While it seems ConfigParser doesn't do any escaping as all, I'm thinking it should at least raise some exception when such a value is trying to be set. I'd expect writing something and then reading it back via the same configparser to *always* result in the same data, as long as writing worked without error. Thoughts? Should I submit a bug report? Florian -- () ascii ribbon campaign - stop html mail www.asciiribbon.org /\ www.the-compiler.org | I love long mails http://email.is-not-s.ms/ To give happiness is to deserve happiness. -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: not available URL: <http://mail.python.org/pipermail/python-dev/attachments/20140425/2c50c918/attachment.sig>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4