'Using is not None, may not always work'
Grant Edwards
grante at visi.com
Fri Aug 6 10:54:07 EDT 2004
On 2004-08-06, Doug Fort <dougfort at dougfort.com> wrote:
> Since I installed 2.4a2 I've been getting a warning from
> pychecker: Using is not None, may not always work'.
Huh?!
That implies that there are cases where "None is not None" will
evaluate as True. I find that extremely hard to believe.
> I thought 'is not None' was the right thing to do.
It's certainly what I want to do if I want to know if a name is
bound to None or not.
> I've had problems with 'if not x:', because some objects
> return False in this context.
Exactly.
--
Grant Edwards grante Yow! I was in a HOT
at TUB! I was NORMAL! I was
visi.com ITALIAN!! I enjoyed th'
EARTHQUAKE!
More information about the Python-list
mailing list