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-April/022208.html below:

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

[Python-Dev] Re: PEP 285: Adding a bool type [Python-Dev] Re: PEP 285: Adding a bool typeGuido van Rossum guido@python.org
Wed, 03 Apr 2002 14:07:21 -0500
> (Python docs tend to use "true" to mean anything which isn't
> "false", and where operator.truth returns the right thing.  this
> won't change post-PEP -- if you start interpreting "return true" as
> "return True", you'll be asking for trouble)

Unclear.  I intend to change as many functions as I reasonably can to
return True/False, and I intend to change their documentation to
match.

While some of the documentation indeed talks of "true" and "false",
those are not well-defined values.  They are properties of values, and
I find it bad style to say "f() returns true if X and false
otherwise".  I would have written that either as "f() returns a true
value if X and a false value otherwise" (in case I don't want to
commit to returning 0 or 1), or "f() returns 1 if X, 0 otherwise" (in
case I do).

--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