Martin v. Löwis <mar...@v.loewis.de> added the comment: Am 17.10.2011 06:22, schrieb Phillip Feldman: > This is a fine example of the so-called "is-ought" controversy.
Wrong. This has nothing to do with desired and factual. A bug, by definition, is a deviation from the specification. This is not a bug, since it exactly follows the specification. Now you may want to challenge the specification, which makes it a feature request. However, given that the PEP was discussed in 2001, you are about ten years late for that. > underlying problem is that this scheme was poorly thought out. I object this assessment. This very behavior was carefully considered and deliberately chosen. > Clearly, the stripping of comments and the source decoding should both be > done in > a single pass, and the source decoding should not be applied to the > comments. That's not clear at all. In general (i.e. for arbitrary encodings), it is not possible to determine where the hash ("#") signs are in the input without decoding. So you have to decode first. In addition, it was a deliberate choice that the source encoding must be consistent (i.e. all characters in the source must decode correctly), even if that is not needed for parsing. This is like requiring colons at the end of statements: they are not needed for parsing, but requiring them improves the language. Regards, Martin ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13185> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com