Something weird about re.finditer()

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sat Apr 18 02:37:09 CEST 2009

In message <pan.2009. at>, 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