[Python-Dev] Python 1.7 tokenization feature request
David M. Beazley
beazley@rustler.cs.uchicago.edu
Mon, 13 Mar 2000 16:35:24 -0600 (CST)
gvwilson@nevex.com writes:
> Once 1.6 is out the door, would people be willing to consider extending
> Python's token set to make HTML/XML-ish spellings using entity references
> legal? This would make the following 100% legal Python:
>
> i = 0
> while i < 10:
> print i & 1
> i = i + 1
>
> which would in turn make it easier to embed Python in XML such as
> config-files-for-whatever-Software-Carpentry-produces-to-replace-make,
> PMZ, and so on.
>
Sure, and while we're at it, maybe we can add support for C trigraph
sequences as well. Maybe I'm missing the point, but why can't you
just use a filter (cgi.escape() or something comparable)? I for one,
am *NOT* in favor of complicating the Python parser in this most bogus
manner.
Furthermore, with respect to the editor argument, I can't think of a
single reason why any sane programmer would be writing programs in
Microsoft Word or whatever it is that you're talking about.
Therefore, I don't think that the Python parser should be modified in
any way to account for XML tags, entities, or other extraneous markup
that's not part of the core language. I know that I, for one, would
be extremely pissed if I fired up emacs and had to maintain someone
else's code that had all of this garbage in it. Just my 0.02.
-- Dave