[New-bugs-announce] [issue22530] re rejects index of type long on 2.7

Ryan Gonzalez report at bugs.python.org
Wed Oct 1 02:39:53 CEST 2014


New submission from Ryan Gonzalez:

This should work (but doesn't):

Python 2.7.8+ (2.7:63dc1e32b715, Sep 30 2014, 19:24:46) 
[GCC 4.2.1 Compatible Clang 3.5.0 (207381)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import re
>>> re.match('(foo)', 'foo').group(1L)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
IndexError: no such group
>>> 

I *think* the attached patch fixes it (but I'm not quite sure).

Here's the relevant mailing list thread: https://mail.python.org/pipermail/python-ideas/2014-September/029590.html.

----------
components: Library (Lib)
files: re.patch
keywords: patch
messages: 228043
nosy: Ryan.Gonzalez
priority: normal
severity: normal
status: open
title: re rejects index of type long on 2.7
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file36766/re.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22530>
_______________________________________


More information about the New-bugs-announce mailing list