New submission from danblack <[email protected]>:
$ pypy -V
Python 2.7.3 (352c78d2e80f4a812ae1d8cdbe8c01a7f2e6fbc0, Aug 19 2013, 10:43:46)
[PyPy 2.1.0 with GCC 4.8.1 20130603 (Red Hat 4.8.1-1)]
(pypyenv) $ ipython
Python 2.7.3 (352c78d2e80f4a812ae1d8cdbe8c01a7f2e6fbc0, Aug 19 2013, 10:43:46)
In [1]: import re
In [2]: m = re.search('(?P<alpha>abc)','abcdef')
In [3]: m.group('CAT')
---------------------------------------------------------------------------
KeyError Traceback (most recent call last)
<ipython-input-3-506c488db4df> in <module>()
----> 1 m.group('CAT')
KeyError: 'CAT'
CPython (2.7.5)
In [1]: import re
In [2]: m = re.search('(?P<alpha>abc)','abcdef')
In [3]: m.group('CAT')
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
<ipython-input-3-506c488db4df> in <module>()
----> 1 m.group('CAT')
IndexError: no such group
----------
messages: 6446
nosy: danblack, pypy-issue
priority: bug
release: 2.1
status: unread
title: Module re behavior different from CPython in Match.group
________________________________________
PyPy bug tracker <[email protected]>
<https://bugs.pypy.org/issue1665>
________________________________________
_______________________________________________
pypy-issue mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-issue