Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can directly hash the code using inspect: https://docs.python.org/3/library/inspect.html#inspect.getso...

And do something similar for the arguments (maybe pickling to get a bytes object you can hash without relying on specific types). Using just the hash function could come with footguns for mutable objects



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: