Ticket #238 (new defect)
Opened 21 months ago
objects which have type checks in __eq__ or __cmp__ break serialization
|Reported by:||ccx@…||Owned by:||xi|
Python classes that raise exceptions on comparison (== operator) may break the serialization as yaml/representer.py:142 contains:
if data in [None, ()]:
It should instead read:
if data is None or data is ():
to avoid invoking the class-defined comparison operations and check for object identity instead.
This currently breaks serialization of numpy.Array classes.