Skip to content

Conversation

@DimitriPapadopoulos
Copy link
Contributor

Change inspired by PEP 0290 (Code Migration and Modernization):

Since there is only one None object, equality can be tested with identity. Identity tests are slightly faster than equality tests. Also, some object types may overload comparison, so equality testing may be much slower.

Pattern::

if v == None  -->  if v is None:
if v != None  -->  if v is not None:

The existing code runs without errors, there is no need to fix this other than "modernization" of the code.

@kasir-barati
Copy link

@brettcannon How can I know when this pep will be released? I am really fascinated in DBC.

I am novice in Python, So please bear with me and gave me as much as possible to read and learn about it

@brettcannon
Copy link
Member

@kasir-barati you will have to either watch the specific PEP, read the release notes of Python, or read the What's New doc when new versions of Python are released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants