Hashing Python code
Project description
Codehash
Installing
Install and update using Pip.
pip install -U codehash
A simple example
from codehash import hash_function
dct = {'a': 1}
def f(x):
return 1 + dct["param"]
h1 = hash_function(f)
def f(x):
"""Docstring."""
return 1 + dct["param"] # comment
h2 = hash_function(f)
dct = {'a': 2}
def f(x):
return 1 + dct["param"]
h3 = hash_function(f)
assert h1 == h2
assert h1 != h3
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
codehash-0.1.0.tar.gz
(9.2 kB
view hashes)