Finn Bock wrote:
>
> I am happy to announce the release of Jython 2.0.
>
I just downloaded Jython2.0, and tried it out on some of my CPython
files. I got in trouble with something that looks OK to me, and that
works fine in CPython. I've simulated it in interactive mode:
Jython 2.0 on java1.1.4 (JIT: null)
Type "copyright", "credits" or "license" for more information.
>>> import re
>>> print re.split("=","X=10")
['X', '10']
>>> print re.split(r"\s=\s","X = 10")
['X', '10']
>>> print re.split(r"\s+=\s+","X = 10")
['X', '10']
>>> print re.split(r"\s*=\s*","X = 10")
Traceback (innermost last):
File "<console>", line 1, in ?
File "C:\WINNT\Java\jython-2.0\Lib\sre.py", line 56, in split
File "C:\WINNT\Java\jython-2.0\Lib\sre.py", line 151, in _split
java.lang.ArrayIndexOutOfBoundsException
Is this a bug, or does Jython use another RE syntax?
Regards,
Jan
|