[issue2636] Regexp 2.6 (modifications to current re 2.2.2)
Mark Summerfield
report at bugs.python.org
Thu Jun 19 16:15:54 CEST 2008
Mark Summerfield <mark at qtrac.eu> added the comment:
[snip]
It seems to me that both using a special prefix or adding an option are
adding a lot of baggage and will increase the learning curve.
The nice thing about (3) (even without slicing) is that it seems a v.
natural extension. But (2) seems magical (i.e., Perl-like rather than
Pythonic) which I really don't like.
BTW I just noticed this:
'<_sre.SRE_Pattern object at 0x9ded020>'
>>> "{0!r}".format(rx)
'<_sre.SRE_Pattern object at 0x9ded020>'
>>> "{0!s}".format(rx)
'<_sre.SRE_Pattern object at 0x9ded020>'
>>> "{0!a}".format(rx)
That's fair enough, but maybe for !s the output should be rx.pattern?
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue2636>
_______________________________________
More information about the Python-bugs-list
mailing list