Python in Chinese

P

Paul McGuire

Back in May, there was quite an extensive discussion of whether or not
Python should support Unicode identifiers (with the final result being
that this would be supported in Python 3). In my periodic googling
for pyparsing users, I stumbled upon Zhpy, a preprocessor that renders
on the fly Chinese Python keywords and indentifiers written using
traditional Chinese characters into ASCII counterparts, and then
executes the resulting script. I was very intrigued at the idea, and
I thought back to Martin v. Löwis's PEP. The Zhpy approach will work
with current versions of Python (going back to 2.3, since pyparsing
requires that version).

You can view examples at the pyparsing "Who's Using Pyparsing" wiki
page - http://pyparsing.wikispaces.com/WhosUsingPyparsing#Zhpy.

Given the breadth of response to Martin v. Löwis's post, I'm curious
as to what the reaction might be to something like Zhpy.

-- Paul
 
?

=?ISO-8859-1?Q?=22Martin_v=2E_L=F6wis=22?=

Paul said:
Back in May, there was quite an extensive discussion of whether or not
Python should support Unicode identifiers (with the final result being
that this would be supported in Python 3). In my periodic googling
for pyparsing users, I stumbled upon Zhpy, a preprocessor that renders
on the fly Chinese Python keywords and indentifiers written using
traditional Chinese characters into ASCII counterparts, and then
executes the resulting script.

Interesting!

Notice what they do to the identifiers - when translating to "English",
the just number them. I wonder what this will do to backtraces,
cross-module imports, and such...

With Python 3, they can restrict themselves to just translating
keywords, and leave all identifiers in place.

Regards,
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,786
Messages
2,569,626
Members
45,328
Latest member
66Teonna9

Latest Threads

Top