[Python-Dev] RE: Defining Unicode Literal Encodings
Tim Peters
tim.one@home.com
Fri, 13 Jul 2001 17:20:12 -0400
[M.-A. Lemburg]
> PEP: 0263 (?)
> Title: Defining Unicode Literal Encodings
> Version: $Revision: 1.0 $
> Author: mal@lemburg.com (Marc-André Lemburg)
> Status: Draft
> Type: Standards Track
> Python-Version: 2.3
> Created: 06-Jun-2001
> Post-History:
Since this depends on PEP 244, it should also have a
Requires: 244
header line.
> ...
> ... can be set using the "directive" statement proposed in PEP 244.
>
> The syntax for the directives is as follows:
>
> 'directive' WS+ 'unicodeencoding' WS* '=' WS* PYTHONSTRINGLITERAL
> 'directive' WS+ 'rawunicodeencoding' WS* '=' WS* PYTHONSTRINGLITERAL
PEP 244 doesn't allow these spellings: at most one atom is allowed after
the directive name, and
= "whatever"
isn't an atom. Remove the '=' and PEP 244 is happy, though. If you want to
keep the "=", PEP 244 has to change.
> ...
[Guido]
> Hm, then the directive would syntactically have to *precede* the
> docstring. That currently doesn't work -- the docstring may only be
> preceded by blank lines and comments. Lots of tools for processing
> docstrings already have this built into them. Is it worth breaking
> them so that editors can remain stupid?
No.