STINNER Victor added the comment: Terry: "Since anything else without ']' is valid (...)"
A Python script can be used to generate a configuration read by another application. This application can more more strict on the configuration format than Python, so I would prefer to deny '\n', '[' and ']' characters in section names. I'm not sure that it's ok to modify Python < 3.6 since it can break applications relying on this ugly "feature". I propose to only modify Python 3.6. If you need strict ConfigParser, you can inherit from the class to override add_section() to add checks on the section name. @SpaceOne: Are you interested to work on a patch? ---------- nosy: +haypo versions: -Python 2.7, Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25723> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com