This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jahschwa
Recipients docs@python, jahschwa, lukasz.langa, r.david.murray
Date 2016-08-22.22:48:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471906107.99.0.0256021186337.issue27824@psf.upfronthosting.co.za>
In-reply-to
Content
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'
History
Date User Action Args
2016-08-22 22:48:28jahschwasetrecipients: + jahschwa, r.david.murray, docs@python, lukasz.langa
2016-08-22 22:48:27jahschwasetmessageid: <1471906107.99.0.0256021186337.issue27824@psf.upfronthosting.co.za>
2016-08-22 22:48:27jahschwalinkissue27824 messages
2016-08-22 22:48:27jahschwacreate