diff options
Diffstat (limited to 'modules/language/python/hash.scm')
-rw-r--r-- | modules/language/python/hash.scm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/language/python/hash.scm b/modules/language/python/hash.scm index 168cd44..423abb3 100644 --- a/modules/language/python/hash.scm +++ b/modules/language/python/hash.scm @@ -42,7 +42,11 @@ s)))) (define-method (py-hash (x <p>)) - (aif it (ref x '__hash__) - (pk 'hash (it)) - (next-method))) - + (define (next) + (catch #t + (lambda () (next-method)) + (lambda x (hash x N)))) + + (aif it (ref-class x '__hash__ #f) + (it) + (next))) |