[issue13185] Why does Python interpreter care about curvy quotes in comments?

Phillip M. Feldman report at bugs.python.org
Mon Oct 17 06:22:14 CEST 2011


Phillip M. Feldman <Phillip.M.Feldman at gmail.com> added the comment:

Hello Martin,

This is a fine example of the so-called "is-ought" controversy.  The error
message is indeed telling me exactly what the problem is, but the underlying
problem is that this scheme was poorly thought out.  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.

Phillip

On Sat, Oct 15, 2011 at 4:26 AM, Martin v. Löwis <report at bugs.python.org>wrote:

>
> Martin v. Löwis <martin at v.loewis.de> added the comment:
>
> The error message told you exactly what the problem is. Your source file
> does not conform to PEP 263. The PEP also explains why this applies to
> comments as well: because the entire file gets decoded according to the
> source encoding, and parsing (including determining what comments are) only
> starts afterwards.
>
> Closing the report as invalid.
>
> ----------
> nosy: +loewis
> resolution:  -> invalid
> status: open -> closed
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue13185>
> _______________________________________
>

----------
nosy: +Phillip.M.Feldman at gmail.com

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13185>
_______________________________________


More information about the Python-bugs-list mailing list