]> granicus.if.org Git - python/commit
The .subn() method wasn't setting _num_regs, which is used by the .groups()
authorAndrew M. Kuchling <amk@amk.ca>
Fri, 21 Aug 1998 18:39:38 +0000 (18:39 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Fri, 21 Aug 1998 18:39:38 +0000 (18:39 +0000)
commit9a80e00cac40dd64709919c29386d8ede39f91d6
treec3b9d62576a3db31d17c9eb59e931ffa11dd1e6a
parentf7039e29ec1fbeeab3aa786a36a4e33abe055b71
The .subn() method wasn't setting _num_regs, which is used by the .groups()
method, so .groups() didn't work inside the replacement function
called by re.sub.  One-line fix: set self._num_regs inside subn().
Lib/re.py