# HG changeset patch # User Paul Boddie # Date 1480636345 -3600 # Node ID 89cd40879bcab776a240ed1f335fc76dacf74400 # Parent 3c7946627c2dc82acbdffbd510f459cc5e4d55a9 Implemented the hash built-in function. diff -r 3c7946627c2d -r 89cd40879bca lib/__builtins__/comparable.py --- a/lib/__builtins__/comparable.py Thu Dec 01 23:48:24 2016 +0100 +++ b/lib/__builtins__/comparable.py Fri Dec 02 00:52:25 2016 +0100 @@ -3,7 +3,7 @@ """ Comparison-related functions. -Copyright (C) 2015 Paul Boddie +Copyright (C) 2015, 2016 Paul Boddie This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -20,6 +20,11 @@ """ def cmp(x, y): pass -def hash(obj): pass + +def hash(obj): + + "Return a hashing value for 'obj'." + + return obj.__hash__() # vim: tabstop=4 expandtab shiftwidth=4