Difference between CPython and Jython
Erik Max Francis
max at alcyone.com
Sun Dec 15 21:08:40 EST 2002
Someone in the field suggested testing my templating system, EmPy, with
Jython, which is something I never bothered trying doing. In the
process of tracking down some differences in the output I came to the
rather peculiar discovery of a difference between CPython and Jython
(which isn't mentioned on the official jython.org "Differences" page):
max at oxygen:~% python2.1 # 2.1.1 is the closest I have to Jython's 2.1
Python 2.1.1 (#6, Sep 2 2001, 10:26:49)
[GCC egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)] on linux2
Type "copyright", "credits" or "license" for more information.
>>> 'a '.split(None, 1)
['a']
max at oxygen:~% jython
Jython 2.1 on java1.3.0 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> 'a '.split(None, 1)
['a', '']
Is this a known difference in behavior?
--
Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
__ San Jose, CA, USA / 37 20 N 121 53 W / &tSftDotIotE
/ \ There are no dull subjects. There are only dull writers.
\__/ H.L. Mencken
Official Omega page / http://www.alcyone.com/max/projects/omega/
The official distribution page for the popular Roguelike, Omega.
More information about the Python-list
mailing list