[Python-ideas] Python 2's re module should take longs

Antoine Pitrou solipsis at pitrou.net
Tue Sep 30 21:57:44 CEST 2014


On Tue, 30 Sep 2014 12:16:13 -0500
Ryan Gonzalez <rymg19 at gmail.com> wrote:
> This works:
> 
> re.search('(abc)', 'abc').group(1)
> 
> but this doesn't:
> 
> re.search('(abc)', 'abc').group(1L)
> 
> The latter raises "IndexError: no such group". Shouldn't that technically
> work?

Yes, it's a bug.  Feel free to open an issue.

Regards

Antoine.




More information about the Python-ideas mailing list