A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2005-March/052028.html below:

[Python-Dev] Adding any() and all()

[Python-Dev] Adding any() and all()Aahz aahz at pythoncraft.com
Fri Mar 11 06:53:22 CET 2005
On Thu, Mar 10, 2005, Bill Janssen wrote:
>Raymond Hettinger:
>>
>> Over time, I've gotten feedback about these and other itertools recipes.
>> No one has objected to the True/False return values in those recipes or
>> in Guido's version.  
>> 
>> Guido's version matches the normal expectation of any/all being a
>> predicate.  Also, it avoids the kind of errors/confusion that people
>> currently experience with Python's unique implementation of "and" and
>> "or".
>> 
>> Returning the last element is not evil; it's just weird, unexpected, and
>> non-obvious.  Resist the urge to get tricky with this one.  

+1

> Fine, but then let's keep reduce(), which has this nice property.

-1
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"The joy of coding Python should be in seeing short, concise, readable
classes that express a lot of action in a small amount of clear code -- 
not in reams of trivial code that bores the reader to death."  --GvR
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