Re Being Pythonic [ was Re: [MERGE] The eol functionality now issues a warning if a rule is configured (bug 358199) ]
Russel Winder
russel.winder at concertant.com
Sat Apr 18 08:49:36 BST 2009
On Fri, 2009-04-17 at 14:11 -0500, John Arbash Meinel wrote:
> ^- as a 'pythonic' thing, you should always use 'is' to compare with
> None, so it would be:
>
> if filter is None:
> ...
OK I am intrigued why is:
if filter is None : . . .
more Pythonic than:
if filter == None : . . .
--
Russel.
============================================================
Dr Russel Winder Partner
Concertant LLP t: +44 20 7585 2200, +44 20 7193 9203
41 Buckmaster Road, f: +44 8700 516 084 voip: sip:russel.winder at ekiga.net
London SW11 1EN, UK. m: +44 7770 465 077 xmpp: russel at russel.org.uk
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090418/fb3b6a7a/attachment.pgp
More information about the bazaar
mailing list