[Python-Dev] Misc re.match() complaint (original) (raw)

Stephen J. Turnbull stephen at xemacs.org
Tue Jul 16 04:03:17 CEST 2013


Guido van Rossum writes:

And I still think that any return type for group() except bytes or str is wrong. (Except possibly a subclass of these.)

I'm not sure I understand. Do you mean in the context of the match object API, where constructing "(target, match.start(), match.end())" to get a group-like object that refers to the target rather than copying the text is simple? (Such objects are very useful in the restricted application of constructing a programmable text editor.)

Or is this something deeper, that a group is a new object in principle?



More information about the Python-Dev mailing list