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
Sun Apr 19 11:23:51 BST 2009


Thanks to Forest, Stephen and Barry for providing feedback on why:

	if filter is None : . . . 

is more Pythonic than:

	if filter == None : . . . 

I hadn't thought about it in terms of using identity equality rather
than value equality, which implies the former is clearly more Pythonic
since None is a singleton.

-- 
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/20090419/21979fa7/attachment.pgp 


More information about the bazaar mailing list