Skip to content

Commit

Permalink
use != instead of 'is not'
Browse files Browse the repository at this point in the history
  • Loading branch information
giampaolo committed Jun 9, 2017
1 parent 70fae77 commit 964f175
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Lib/selectors.py
Expand Up @@ -259,7 +259,7 @@ def modify(self, fileobj, events, data=None):
if events != key.events:
self.unregister(fileobj)
key = self.register(fileobj, events, data)
elif data is not key.data:
elif data != key.data:
# Use a shortcut to update the data.
key = key._replace(data=data)
self._fd_to_key[key.fd] = key
Expand Down Expand Up @@ -391,7 +391,7 @@ def modify(self, fileobj, events, data=None):
super().unregister(fileobj)
raise
changed = True
if data is not key.data:
if data != key.data:
changed = True

if changed:
Expand Down

0 comments on commit 964f175

Please sign in to comment.