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/2004-March/043312.html below:

[Python-Dev] redefining is

[Python-Dev] redefining is [Python-Dev] redefining isAndrew Koenig ark-mlist at att.net
Fri Mar 19 14:19:39 EST 2004
> The problem (if there is any) with 'is' is that it exposes
> implementation details, therefore it should not be used unless on really
> knows what one is doing.

Yes.  Also, I think that in general, operations that should be used only by
people who really know what they're doing should be harder to express.

> And 'if obj is None' gains performance by relying on one of these.

> So I would consider 'if obj == None' correct, but unoptimized code.

Actually, it's incorrect, because obj could be of a class that redefines ==
to yield True in that case.



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