"/a" is not "/a" ?

Steve Holden steve at holdenweb.com
Sat Mar 14 15:12:09 CET 2009

Paul Rubin wrote:
> Steven D'Aprano <steve at pearwood.info> writes:
>> It is never
>> correct to avoid using "is" when you need to compare for identity.
> When is it ever necessary to compare for identity?

For example when providing a unique "sentinel" value as a function
argument.  The parameter must be tested for identity with the sentinel.

Steve Holden           +1 571 484 6266   +1 800 494 3119
Holden Web LLC                 http://www.holdenweb.com/
Want to know? Come to PyCon - soon! http://us.pycon.org/

More information about the Python-list mailing list