Antoine Pitrou schrieb:
Georg Brandl <g.brandl <at> gmx.net> writes:

It does, but I don't see how it contradicts my proposition. find() takes a
substring as well.

Well, I'm not sure what your proposal was :-)
Did you mean to keep split() out of the String interface, or to provide a
default implementation of it based on find() and slicing?

You wrote:

> If we stay minimalistic we could consider that the three basic operations that
> define a string are:
> - testing for substring containment
> - splitting on a substring into a list of substrings
> - slicing in order to extract a substring

I argued that instead of split, find belongs into that list.
(BTW, length inquiry would be a fourth.)

That the other methods, among them split, can be implemented in terms
of those, follows from both sets of basic operations.

Georg

_______________________________________________
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