Something weird about re.finditer()

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Fri Apr 17 20:37:09 EDT 2009


In message <pan.2009.04.15.09.14.56 at REMOVE.THIS.cybersource.com.au>, Steven 
D'Aprano wrote:

> BTW, testing for None with == is not recommended, because one day
> somebody might pass your function some strange object that compares equal
> to None.

Presumably if it compares equal to None, that is by design, precisely so it 
would work in this way.




More information about the Python-list mailing list