[New-bugs-announce] [issue45060] Do not use the equality operators with None

Serhiy Storchaka report at bugs.python.org
Tue Aug 31 07:47:38 EDT 2021


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

There are few uses of operators "==" and "!=" with None in the stdlib (against more than 8000 uses of "is" and "is not"). It is very uncommon writing, contradicts PEP 8, and is not safe in general.

One bug was found -- using "==" instead of assignment (issue45059).

----------
components: Library (Lib)
messages: 400715
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Do not use the equality operators with None
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45060>
_______________________________________


More information about the New-bugs-announce mailing list