Message263020
>>> 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 "==". |
|
Date |
User |
Action |
Args |
2016-04-08 11:24:19 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, ronaldoussoren |
2016-04-08 11:24:19 | serhiy.storchaka | set | messageid: <1460114659.45.0.149207937372.issue26711@psf.upfronthosting.co.za> |
2016-04-08 11:24:19 | serhiy.storchaka | link | issue26711 messages |
2016-04-08 11:24:19 | serhiy.storchaka | create | |
|