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-May/024381.html below:

[Python-Dev] Style guide (PEP 8) updated

[Python-Dev] Style guide (PEP 8) updated [Python-Dev] Style guide (PEP 8) updatedGuido van Rossum guido@python.org
Fri, 24 May 2002 14:28:22 -0400
> I'd add that checks for None should always be done using 'is (not)
> None'.

Yes.  Also, more subtle: beware of writing "if x" when you really mean
"if x is not None" -- e.g. when testing whether a variable or argument
that defaults to None was set to some other value.  This bit us
recently in a Zope project when x was a database object that happened
to respond to len(), unbeknownst to the author.  During testing the
database was never empty, so we didn't catch it until much later.

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