469,616 Members | 1,741 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,616 developers. It's quick & easy.

Python in Chinese

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

Aug 13 '07 #1
1 2296
Paul McGuire schrieb:
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
Aug 13 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Achim Domma | last post: by
57 posts views Thread by John Howard | last post: by
1 post views Thread by Posadas, Dennis | last post: by
1 post views Thread by Anthony Liu | last post: by
12 posts views Thread by xiong.xu.cn | last post: by
7 posts views Thread by kernel1983 | last post: by
12 posts views Thread by Steve Howell | last post: by
reply views Thread by devrayhaan | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.