Closed emfdavid closed 1 year ago
Wow, what a coincidence, I just ran into this limitation today too. I think that the first suggestion is the most straightforward and I added it in the above pull request. I also added tests, which probably wasn't really necessary, since they're basically just testing the built-in hash function, but I thought it couldn't hurt.
Ran into this issue too and this solution solved it. uuid.UUID
implements a __hash__
, so this approach seems consistent.
Suggest you implement hash to allow use as a dictionary key.
I am getting the following issue using ULID as a custom type in a SqlAlchemy Model.
Maybe add something like this?
or
Though, that might be a longer integer than expected for a hash value?