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/2002-March/020938.html below:

[Python-Dev] For review: PEP 285: Adding a bool type

[Python-Dev] For review: PEP 285: Adding a bool type [Python-Dev] For review: PEP 285: Adding a bool typeGuido van Rossum guido@python.org
Mon, 11 Mar 2002 08:43:04 -0500
> These "other kinds of true and false" should IMHO be implemented
> via a conversion method __bool__ (just like __int__, __str__,
> __unicode__ etc.) and will be a bool aware version of __nonzero__
> which should be deprecated.
> 
> if should internally call this bool conversion method.

IMO there's no need to have a separate __bool__.  We can simply say
__nonzero__ may return 0 or False, or 1 or True.  I see no advantage
in introducing a separate __bool__.

--Guido van Rossum (home page: http://www.python.org/~guido/)



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