diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2016-05-01 10:36:42 (GMT) |
|---|---|---|
| committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-05-01 10:36:42 (GMT) |
| commit | 47d1d7f48a841dc5539638c3941445d8507e6beb (patch) | |
| tree | d8bea256ab2b21cc660aa31f5df74433f9f1a3ef /Lib/plistlib.py | |
| parent | b608196b20483ef69fab0383e61d3e53aed04ece (diff) | |
| parent | dd1bcdf6187ff18fb1536a6190926b0f03336186 (diff) | |
| download | cpython-47d1d7f48a841dc5539638c3941445d8507e6beb.zip cpython-47d1d7f48a841dc5539638c3941445d8507e6beb.tar.gz cpython-47d1d7f48a841dc5539638c3941445d8507e6beb.tar.bz2 | |
Issue #26711: Fixed the comparison of plistlib.Data with other types.
Diffstat (limited to 'Lib/plistlib.py')
| -rw-r--r-- | Lib/plistlib.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/plistlib.py b/Lib/plistlib.py index a39151f..b66639c 100644 --- a/Lib/plistlib.py +++ b/Lib/plistlib.py @@ -225,10 +225,10 @@ class Data: def __eq__(self, other): if isinstance(other, self.__class__): return self.data == other.data - elif isinstance(other, str): + elif isinstance(other, bytes): return self.data == other else: - return id(self) == id(other) + return NotImplemented def __repr__(self): return "%s(%s)" % (self.__class__.__name__, repr(self.data)) |
