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.
Description
Description
Details
Details
Subject | Repo | Branch | Lines +/- | |
---|---|---|---|---|
[Bugfix] Add hash method to WbTime | pywikibot/core | master | +15 -0 |
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T87764 Bugs related to time datatype (tracking) | |||
Resolved | BUG REPORT | RPI2026F1 | T123888 Incorrect default month and day for WbTime | ||
Resolved | Feature | RPI2026F1 | T148280 WbTime comparison is incorrect | ||
Invalid | RPI2026F1 | T324343 Implement hash function for WbTime objects |
Event Timeline
Comment Actions
Change 863370 had a related patch set uploaded (by RPI2026F1; author: RPI2026F1):
[pywikibot/core@master] [Bug] Add hash method to WbTime
Comment Actions
Change 863370 abandoned by RPI2026F1:
[pywikibot/core@master] [Bugfix] Add hash method to WbTime
Reason:
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.