New submission from py.user <port...@yandex.ru>: >>> import re >>> p = re.compile(r'abc(?P<n>def)') >>> p.sub(r'\g<n>', 'abcdef123abcdef') 'def123def' >>> p.groupindex['n'] = 2 >>> p.sub(r'\g<n>', 'abcdef123abcdef') 'def123def' >>> p.groupindex {'n': 2} >>>
---------- components: Regular Expressions messages: 155442 nosy: ezio.melotti, mrabarnett, py.user priority: normal severity: normal status: open title: regex.groupindex available for modification and continues to work, having incorrect data inside it type: behavior versions: Python 3.2 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue14260> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com