robotpy / pynetworktables

Pure python implementation of the FRC NetworkTables protocol
Other
60 stars 30 forks source link

Make NetworkTablesEntry actually unhashable #52

Closed auscompgeek closed 6 years ago

auscompgeek commented 6 years ago

With a C.__hash__() method, issubclass(C, collections.abc.Hashable) returns True. Overriding __eq__() causes __hash__ to be set to None, which gives us the behaviour that we want.