Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
4df85e49
Commit
4df85e49
authored
Nov 15, 2014
by
Damien George
Browse files
tests: Add test for hash of user defined class.
parent
e00eeaf4
Changes
1
Hide whitespace changes
Inline
Side-by-side
tests/basics/builtin_hash.py
0 → 100644
View file @
4df85e49
# test builtin hash function
class
A
:
def
__hash__
(
self
):
return
123
def
__repr__
(
self
):
return
"a instance"
print
(
hash
(
A
()))
print
({
A
():
1
})
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment