Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#13343 closed Patch - Bug Fix (fixed)

GitHub: PR 175 Compare to `None` using identity `is` operator

Reported by: janisozaur Owned by: Bill Meek
Priority: trivial Milestone: 31.1
Component: Bindings - Python Version: Master Head
Severity: low Keywords:
Cc: Ticket locked: no

Description

https://github.com/MythTV/mythtv/pull/175

This is a trivial change that replaces == operator with is operator, following PEP 8 guideline:

Comparisons to singletons like None should always be done with is or is not, never the equality operators.

https://legacy.python.org/dev/peps/pep-0008/#programming-recommendations

Change History (4)

comment:1 Changed 5 years ago by Stuart Auchterlonie

Component: MythTV - GeneralBindings - Python
Milestone: needs_triage31.0
Owner: set to Raymond Wagner
Version: UnspecifiedMaster Head

comment:2 Changed 4 years ago by Stuart Auchterlonie

Milestone: 31.031.1

Moving open tickets v31.0 -> v31.1

comment:3 Changed 4 years ago by Michał Janiszewski <janisozaur+signed@…>

Resolution: fixed
Status: newclosed

In c0b8b6e03/mythtv:

Compare to None using identity is operator

This is a trivial change that replaces == operator with is operator, following PEP 8 guideline:

Comparisons to singletons like None should always be done with is or is not, never the equality operators.

https://legacy.python.org/dev/peps/pep-0008/#programming-recommendations

Closes #13343

(cherry picked from commit 2e7e9e82ae71e958a7844e768d3d2758cf6df3ad)

Signed-off-by: Bill Meek <billmeek@…>

comment:4 Changed 4 years ago by Bill Meek

Owner: changed from Raymond Wagner to Bill Meek
Priority: minortrivial
Severity: mediumlow
Note: See TracTickets for help on using tickets.