Łukasz Langa <luk...@langa.pl> added the comment: Patch updated.
All docstrings now have a one-line summary. All multiline docstrings now have a newline character before the closing """. No method docstrings now include any additional newlines between them and the code. Most of them were okay, a couple were edited for consistency. All read_* methods now have a source= attribute. read_file defaults to <???>, read_string to <string>, read_dict to <dict>. Didn't provide any additional introspection because it's not trivial and I want this patch to be committed at last. This might be an additional advantage because a generic <string> or <dict> name may motivate programmers to specify a more context-specific source name of their own. As for Duplicate*Error, I've added source= and lineno= to both. Didn't add line= because it's useless, the error is very specific on what is wrong. Reading from a dictionary does not pass the lineno for obvious reasons. Reading from files and strings does. The `filename' attribute and __init__ argument in ParsingError were PendingDeprecated and a `source' attribute was introduced for consistency. `allow_no_value` was moved to the 3rd place in the argument list for backwards compatibility with Python 2.7. I didn't notice your change made to Python 2.7 as well, all other new arguments were added by me. This ensures there's no backwards compatibility involved in their case. That's why I left all of the new arguments as keyword only. Documentation and unit tests updated. BTW, if `allow_no_value` made it to 2.7 this means it has a bug in SafeConfigParser.set. Try to set a valueless option, line 694 will raise an exception. Should I provide you with a separate patch only to fix this for 2.7.1? PS. I made Vim show me too long lines with a delicate red background. Way better than the violent alternative ;) Plus, I only set it for the Python filetype. ---------- Added file: http://bugs.python.org/file18440/issue9452.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9452> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com