4 ms·
> <_sre.SRE_Match object at 0x7fc6c5a2c510> Thank you so much Python. No further questions.
by draw_down 5y ago
> <_sre.SRE_Match object at 0x7fc6c5a2c510>
Thank you so much Python. No further questions.
- formerly_proven 5y agoThis is a fair criticism, though it has been addressed some time in the last twelve years or so >>> import re; re.compile('').search('foo') <_sre.SRE_Match object; span=(0, 0), match=''>
- faho 5y agohttps://bugs.python.org/issue17087 https://bugs.python.org/issue17087, fixed in python 3.4 (released in March 2014). The article, from 2010, tested python 2.5.
- draw_down 5y agoOh nice. Upgrading from Python 2 to 3 is only one major version, should be no sweat!
- asicsp 5y agoIt is `re.Match object` now, which I think is more readable. Also, matched portions can be retrieved using `[N]` in addition to `.group(N)`
- goto11 5y agoAre you praising or complaining that Python returns an object rather than a plain string?
- draw_down 5y ago<_HN.Discussion_Reply object at 0x8eb4c5a2c231>