[MERGE] compare types with "is" not ==

Barry Warsaw barry at python.org
Sat Mar 7 23:48:54 GMT 2009


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mar 7, 2009, at 4:56 PM, John Arbash Meinel wrote:

> Benjamin Peterson wrote:
>> 2009/3/7 Benjamin Peterson <benjamin at python.org>:
>>> __class__ should always be compared with "is"
>>
>> Attaching the patch should help.
>
> I'm curious if this is really a big difference or not. But you  
> certainly
> already did the work, and if it is "better python" then I'm happy to
> have it merged.

It is.  It's probably imperceptibly faster too. :)

Barry

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Darwin)

iQCVAwUBSbMH5nEjvBPtnXfVAQLPrwP/UISjV50S7bDJPadkfmNYdPt26QiPcmTq
dFsPkOzZ4w8lMER5V3NqPmlbIgk1RCO7ogN3yuwNPNUtFIPMymVTJ7vPA0XfQofX
oxzL+K2viYb49IUHS1pIm5h5FuDm9OpAuRK3cSoDrfjECLzAuUNnhK+wKFP1KdKc
axhQUbHEw7Q=
=fEMs
-----END PGP SIGNATURE-----



More information about the bazaar mailing list