This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author serhiy.storchaka
Recipients ronaldoussoren, serhiy.storchaka
Date 2016-04-08.11:24:19
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1460114659.45.0.149207937372.issue26711@psf.upfronthosting.co.za>
In-reply-to
Content
>>> import plistlib
>>> class MyData(bytes):
...     def __eq__(self, other):
...         if isinstance(other, plistlib.Data):
...             return super().__eq__(other.value)
...         return False
... 
>>> plistlib.Data(b'x') == MyData(b'x')
True

If use the equality operator the result is False.

I don't know if this is good example. In any case this is corner case and we can manage with "==".
History
Date User Action Args
2016-04-08 11:24:19serhiy.storchakasetrecipients: + serhiy.storchaka, ronaldoussoren
2016-04-08 11:24:19serhiy.storchakasetmessageid: <1460114659.45.0.149207937372.issue26711@psf.upfronthosting.co.za>
2016-04-08 11:24:19serhiy.storchakalinkissue26711 messages
2016-04-08 11:24:19serhiy.storchakacreate