Monday, May 12, 2008

Chinese Names in Python

In my earlier experiments with the I-Ching, I used Chinese characters as string literals within Python 3.0 (alpha 2) source code.

In the screen shot above, developed on my newly upgraded Ubuntu Dell, I'm actually using Chinese characters as full-fledged Python names, not just as quoted strings.

Not knowing Chinese, I'm not suggesting my particular choices make a whole lot of sense.

Also, given self is not really a key word, I might have used a word from yet another language in place of it.

However, we tend to consider it quirky to swap out self for some other name in Python, so I left it alone.

Yes, I realize Mount Fuji is in Japan, not China. Did you know that the Japanese language includes many Chinese characters, called kanji?