[pypy-issue] Issue #1849: Py2: 'a, b, c'.split(u', ') returns wrong/different stringtype (pypy/pypy)
Markus Unterwaditzer
issues-reply at bitbucket.org
Tue Aug 19 23:26:53 CEST 2014
New issue 1849: Py2: 'a, b, c'.split(u', ') returns wrong/different stringtype
https://bitbucket.org/pypy/pypy/issue/1849/py2-a-b-csplit-u-returns-wrong-different
Markus Unterwaditzer:
Given the following snippet:
```
#!python
'a, b, c'.split(u', ')
```
Result in CPython:
```
$ python2
Python 2.7.8 (default, Jul 1 2014, 17:30:21)
[GCC 4.9.0 20140604 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 'a, b, c'.split(u', ')
[u'a', u'b', u'c']
```
Result in PyPy:
```
$ pypy
Python 2.7.6 (3cf384e86ef7, Jul 09 2014, 04:28:24)
[PyPy 2.4.0-alpha0 with GCC 4.9.0 20140604 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
And now for something completely different: ``samuele says that we lost a
razor. so we can't shave yaks''
>>>> 'a, b, c'.split(u', ')
['a', 'b', 'c']
>>>>
```
I hope the version information given in the shell session is sufficient.
More information about the pypy-issue
mailing list