Open
Description
Models such as Responders
define the __eq__()
and __ne__()
methods appropriately, but not __hash__()
.
From the Python documentation:
If a class [...] defines
__cmp__()
or__eq__()
but not__hash__()
, its instances will not be usable in hashed collections.
The practical consequence of this is that set((Responders(type='team', name='foo'))) != set((Responders(type='team', name='foo')))
which is quite confusing!
I suspect that this may be a bug coming from the Open Api Generator, but I am not familiar with the generator implementation and its use so am raising this bug here in the first instance.
Metadata
Metadata
Assignees
Labels
No labels