circuitpython/tests/basics/builtin_hash_gen.py
Damien George f69ab79ec8 py/objgenerator: Allow to hash generators and generator instances.
Adds nothing to the code size, since it uses existing empty slots in the
type structures.
2017-07-07 11:47:38 +10:00

8 lines
115 B
Python

# test builtin hash function, on generators
def gen():
yield
print(type(hash(gen)))
print(type(hash(gen())))