comparison urwid_satext/sat_widgets.py @ 144:bfab04d0a745

ListOption: add __hash__ method
author Goffi <goffi@goffi.org>
date Sun, 27 Oct 2019 18:55:47 +0100
parents 144bdf877d21
children aa8f46b43a71
comparison
equal deleted inserted replaced
143:144bdf877d21 144:bfab04d0a745
408 try: 408 try:
409 return self._value != other._value 409 return self._value != other._value
410 except AttributeError: 410 except AttributeError:
411 return self._value != other 411 return self._value != other
412 412
413 def __hash__(self):
414 return hash(self._value)
415
413 @property 416 @property
414 def value(self): 417 def value(self):
415 """ return option value """ 418 """ return option value """
416 return self._value 419 return self._value
417 420