A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-August/055801.html below:

[Python-Dev] partition() (was: Remove str.find in 3.0?)

[Python-Dev] partition() (was: Remove str.find in 3.0?) [Python-Dev] partition() (was: Remove str.find in 3.0?)Terry Reedy tjreedy at udel.edu
Tue Aug 30 07:12:41 CEST 2005
"Raymond Hettinger" <raymond.hettinger at verizon.net> wrote in
> Yes, there is a precise spec and yes it always returns three strings.

While the find/index discussion was about "what is the best way to indicate 
'cannot answer'", part of the conclusion is that any way can be awkward. 
So I am generally in favor of defining a function, when possible, so that 
it can always deliver an answer (giving inputs of the appropriate types) 
and so that the 'best way' question is moot.  Nicely done.

I think the name 'partition' is fine too.  It does not preclude putting a 
quicksort-type partition function in a module of list functions.  The only 
alternative I can think of is 'tripart', but I do *not* prefer that.

Terry J. Reedy



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4