1
0
Fork
You've already forked python
0

Add missing dunder methods #3

Merged
notpushkin merged 3 commits from fix/dunder into master 2026年04月17日 21:31:42 +02:00

__hash__ in particular allows using PrettyIds as dict keys properly:

d = {
 PrettyId("task_068n34jrjdth1fqr2nm9a0sh50"): 1,
}
d[PrettyId("task_068n34jrjdth1fqr2nm9a0sh50")] # => 1
`__hash__` in particular allows using PrettyIds as dict keys properly: ```py d = { PrettyId("task_068n34jrjdth1fqr2nm9a0sh50"): 1, } d[PrettyId("task_068n34jrjdth1fqr2nm9a0sh50")] # => 1 ```
add tests
All checks were successful
Publish / run (pull_request) Successful in 1m57s
4aa66d8e35
0.3.5
All checks were successful
Publish / run (pull_request) Successful in 1m55s
5fa988ae31
Sign in to join this conversation.
No reviewers
Labels
Clear labels
No items
No labels
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
prettyid/python!3
Reference in a new issue
prettyid/python
No description provided.
Delete branch "fix/dunder"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?