[Python-Dev] Python 1.7 tokenization feature request

Ka-Ping Yee ping@lfw.org
Tue, 14 Mar 2000 06:19:59 -0500 (EST)


On Tue, 14 Mar 2000, Moshe Zadka wrote:
> On Mon, 13 Mar 2000 gvwilson@nevex.com wrote:
> > legal?  This would make the following 100% legal Python:
> > 
> > i = 0
> > while i < 10:
> >     print i & 1
> >     i = i + 1
> 
> Why? Whatever XML parser you use will output "i&lt;1" as "i<1", so 
> the Python that comes out of the XML parser is quite all right. Why change
> Python to do an XML parser job?

I totally agree.

To me, this is the key issue: it is NOT the responsibility of the
programming language to accommodate any particular encoding format.

While we're at it, why don't we change Python to accept
quoted-printable source code?  Or base64-encoded source code?

XML already defines a perfectly reasonable mechanism for
escaping a plain stream of text -- adding this processing to
Python adds nothing but confusion.  The possible useful
benefit from adding the proposed "feature" is exactly zero.


-- ?!ng

"This code is better than any code that doesn't work has any right to be."
    -- Roger Gregory, on Xanadu