Fredrik Lundh wrote:

> the problem isn't the time it takes to unpack the return value, the
> problem is that it takes time to create the substrings that you don't
> need. 

I'm actually starting to think that this may be a good use case for
views of strings i.e. rather than create 3 new strings, each "string" is
a view onto the string that was partitioned.

Most of the use cases I've seen, the partitioned bits are discarded
almost as soon as the original string, and often the original string
persists beyond the partitioned bits.

Tim Delaney
_______________________________________________
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