On Mon, Jul 15, 2013 at 7:18 PM, MRAB <pyt...@mrabarnett.plus.com> wrote:
> On the other hand, I think that it's not unreasonable that the output
> is the same type as the input. You could reason that what it's doing is
> returning a slice of the input, and that slice should be the same type
> as its source.

By now I'm pretty sure that is why it changed.

But I am challenging how useful that is, compared to always returning
something immutable.

> Incidentally, the regex module does what Python 3's re module currently
> does, even in Python 2. Nobody's complained!

Well, you'd only see complaints from folks who (a) use the regex
module, (b) use it with a buffer object as the target string, and (c)
try to use the group() return value as a dict key. Each of these is
probably a small majority of all users.

-- 
--Guido van Rossum (python.org/~guido)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to