[issue13177] Avoid chained exceptions in lru_cache

Ezio Melotti report at bugs.python.org
Sun Oct 16 09:31:10 CEST 2011


Ezio Melotti <ezio.melotti at gmail.com> added the comment:

My comment was referring to double try/except suggested by Eric.  Indeed the if/else might lead to a race condition, and that's a good reason to avoid LBYL -- even if on average calling hash() twice might be faster.
I'm happy with the fix you committed, thanks!

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13177>
_______________________________________


More information about the Python-bugs-list mailing list