Page MenuHomePhabricator

Implement hash function for WbTime objects
Closed, InvalidPublic


When a __eq__() function is added, types stop being hashable. Hashing works before because when no __eq__() function is implemented, identity checks are used for both equality and hashing.

Event Timeline

Blocks parent task, also with High priority

Change 863370 had a related patch set uploaded (by RPI2026F1; author: RPI2026F1):

[pywikibot/core@master] [Bug] Add hash method to WbTime

Change 863370 abandoned by RPI2026F1:

[pywikibot/core@master] [Bugfix] Add hash method to WbTime


It's come to my attention that equality should not use a similar process to comparison, since two times that are technically the same number of seconds but in different timezones aren't really equal. Thus there's no need for the hash function.