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-September/056514.html below:

[Python-Dev] "and" and "or" operators in Py3.0

[Python-Dev] "and" and "or" operators in Py3.0 [Python-Dev] "and" and "or" operators in Py3.0Ron Adam rrr at ronadam.com
Tue Sep 20 02:38:25 CEST 2005
Raymond Hettinger wrote:
> I propose that in Py3.0, the "and" and "or" operators be simplified to
> always return a Boolean value instead of returning the last evaluated
> argument.
> 
> 1) The construct can be error-prone.  When an error occurs it can be
> invisible to the person who wrote it.  I got bitten in published code
> that had survived testing and code review:

Yes, I wondered about that possibility myself.

+1


> P.S.  Simplifying "and" and "or" may create a need to introduce a
> conditional operator but that is a discussion for another day.

You would still be able to use multiply to covert a comparison to a value.

Cheers,
Ron
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