On Thu, Sep 1, 2011 at 12:29, Chris Fuller <[email protected]> wrote:
> *Ahem*
>
> def is_hashable(object):
> try:
> hash(object)
> except TypeError:
> return False
>
> return True
Why is that preferred to
def is_hashable(object):
try:
hash(object)
return True
except TypeError:
return False
??
Dick
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor
