[Python-Dev] Python 1.7 tokenization feature request

David Ascher DavidA@ActiveState.com
Mon, 13 Mar 2000 15:36:54 -0800


> > David Ascher wrote:
> > But the scheme you put forth causes major problems for current Python
> > users who *are* using glass TTYs, so I don't think it'll fly for very
> > basic political reasons nicely illustrated by Dave's response.
>
> Understood.  I thought that handling standard entities might be a
> useful first step toward storage of Python as XML, which in turn would
> help make Python more accessible to people who don't want to switch
> editors just to program.  I felt that an all-or-nothing approach would be
> even less likely to get a favorable response than handling entities... :-)
>
> Greg

If you propose a transformation between Python Syntax and XML, then you
potentially have something which all parties can agree to as being a good
thing.  Forcing one into the other is denying the history and current
practices of both domains and user populations.  You cannot ignore the fact
that "I can read anyone's Python" is a key selling point of Python among its
current practitioners, or that its cleanliness and lack of magic characters
($ is usually invoked, but < is just as magic/ugly) are part of its
appeal/success.

No XML editor is going to edit all XML documents without custom editors
anyway!  I certainly don't expect to be drawing SVG diagrams with a
keyboard!  That's what schemas and custom editors are for.  Define a schema
for 'encoded Python' (well, first, find a schema notation that will
survive), write a plugin to your favorite XML editor, and then your
(theoretical? =) users can use the same 'editor' to edit PythonXML or any
other XML.  Most XML probably won't be edited with a keyboard but with a
pointing device or a speech recognizer anyway...

IMO, you're being seduced by the apparent closeness between XML and
Python-in-ASCII.  It's only superficial...  Think of Python-in-ASCII as a
rendering of Python-in-XML, Dave will think of Python-in-XML as a rendering
of Python-in-ASCII, and everyone will be happy (as long as everyone agrees
on the one-to-one transformation).

--david