[issue13177] Avoid chained exceptions in lru_cache
Raymond Hettinger
report at bugs.python.org
Sun Oct 16 08:23:25 CEST 2011
Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:
Sorry, I'm not going to introduce a possible race condition because you find try/except to be less elegant than an if-contains test. Also, I want to keep the current behavior of calling hash only once. Your original complaint is valid though, so I'll go ahead and move the user_function call outside the exception block so as to avoid unnecessary exception chaining.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13177>
_______________________________________
More information about the Python-bugs-list
mailing list