[issue13177] Avoid chained exceptions in lru_cache
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>
More information about the Python-bugs-list