Improving Clarity of re Module
28 Nov
2013
28 Nov
'13
2:46 a.m.
On 11/27/2013 11:06 AM, Ned Batchelder wrote:
* While we're at it, how can it be that we haven't improved the __repr__ after all *>* these years? *>>* >>> m = re.search("[ab]", "xay") *>* >>> m *>* <_sre.SRE_Match object at 0x10a2ce9f0> *>>* _sre? SRE_Match? huh? :) *>>
* --Ned.* Actually, it's fixed in Python 3.4, see http://bugs.python.org/issue17087. Python 3.4.0b1 (default:9c7ab3e68243, Nov 26 2013, 19:42:06) [GCC 4.2.1 20070831 patched [FreeBSD]] on freebsd8 Type "help", "copyright", "credits" or "license" for more information.
import re re.search('aaa', 'aaab') <_sre.SRE_Match object; span=(0, 3), match='aaa'>
3799
Age (days ago)
3799
Last active (days ago)
0 comments
1 participants
participants (1)
-
Popa Claudiu