Message273410
I'm not sure it's deprecated so much as moved. Python 3.5 includes an additional init parameter, so setting inline_comment_prefixes=';' allows inline comments even for values containing the ';' character, displaying the "expected behavior" described in my original bug report. They are, however, disabled by default, unlike in Python 2.7.
I also have a different proposal I think might be more clear:
Configuration files may include comments, prefixed by specific characters. Comments may appear on their own in an otherwise empty line using either '#' or ';'. In addition, inline comments can be added to the end of a line after a ';' as long as the ';' is preceded by a whitespace character. Only the first ';' in a line is checked, so an inline comment cannot be added to lines that already contain any ';'s.
I'm also wondering if an example would be a good idea, as I don't think any of the examples on the doc page include comments:
# this is a comment
; this is also a comment
foo = bar ; inline comment
password = jgfw;as1 ; this will be parsed as part of 'password' |
|
Date |
User |
Action |
Args |
2016-08-22 22:48:28 | jahschwa | set | recipients:
+ jahschwa, r.david.murray, docs@python, lukasz.langa |
2016-08-22 22:48:27 | jahschwa | set | messageid: <1471906107.99.0.0256021186337.issue27824@psf.upfronthosting.co.za> |
2016-08-22 22:48:27 | jahschwa | link | issue27824 messages |
2016-08-22 22:48:27 | jahschwa | create | |
|