Mailing List Archive

Ticket #13343: GitHub: PR 175 Compare to `None` using identity `is` operator
#13343: GitHub: PR 175 Compare to `None` using identity `is` operator
----------------------------------+--------------------------
Reporter: janisozaur | Owner: (none)
Type: Patch - Bug Fix | Status: new
Priority: minor | Milestone: needs_triage
Component: MythTV - General | Version: Unspecified
Severity: medium | Keywords:
Ticket locked: 0 |
----------------------------------+--------------------------
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

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13343>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13343: GitHub: PR 175 Compare to `None` using identity `is` operator [ In reply to ]
#13343: GitHub: PR 175 Compare to `None` using identity `is` operator
-------------------------------+--------------------------------
Reporter: janisozaur | Owner: Raymond Wagner
Type: Patch - Bug Fix | Status: new
Priority: minor | Milestone: 31.0
Component: Bindings - Python | Version: Master Head
Severity: medium | Resolution:
Keywords: | Ticket locked: 0
-------------------------------+--------------------------------
Changes (by Stuart Auchterlonie):

* owner: (none) => Raymond Wagner
* version: Unspecified => Master Head
* component: MythTV - General => Bindings - Python
* milestone: needs_triage => 31.0


--
Ticket URL: <https://code.mythtv.org/trac/ticket/13343#comment:1>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13343: GitHub: PR 175 Compare to `None` using identity `is` operator [ In reply to ]
#13343: GitHub: PR 175 Compare to `None` using identity `is` operator
-------------------------------+--------------------------------
Reporter: janisozaur | Owner: Raymond Wagner
Type: Patch - Bug Fix | Status: closed
Priority: minor | Milestone: 31.1
Component: Bindings - Python | Version: Master Head
Severity: medium | Resolution: fixed
Keywords: | Ticket locked: 0
-------------------------------+--------------------------------
Changes (by Micha? Janiszewski <janisozaur+signed@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"c0b8b6e036bdb531fe09be8005dcf1181d9333ec/mythtv"
c0b8b6e03/mythtv]:
{{{
#!CommitTicketReference repository="mythtv"
revision="c0b8b6e036bdb531fe09be8005dcf1181d9333ec"
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@mythtv.org>
}}}

--
Ticket URL: <https://code.mythtv.org/trac/ticket/13343#comment:3>
MythTV <http://www.mythtv.org>
MythTV Media Center
Re: Ticket #13343: GitHub: PR 175 Compare to `None` using identity `is` operator [ In reply to ]
#13343: GitHub: PR 175 Compare to `None` using identity `is` operator
-------------------------------+-----------------------------
Reporter: janisozaur | Owner: Bill Meek
Type: Patch - Bug Fix | Status: closed
Priority: trivial | Milestone: 31.1
Component: Bindings - Python | Version: Master Head
Severity: low | Resolution: fixed
Keywords: | Ticket locked: 0
-------------------------------+-----------------------------
Changes (by Bill Meek):

* owner: Raymond Wagner => Bill Meek
* priority: minor => trivial
* severity: medium => low


--
Ticket URL: <https://code.mythtv.org/trac/ticket/13343#comment:4>
MythTV <http://www.mythtv.org>
MythTV Media Center