This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Eloff
Recipients Eloff
Date 2009-06-13.22:45:28
SpamBayes Score 1.0442206e-07
Marked as misclassified No
Message-id <>
The try statement at the end of is some of the worst python
code I've had the mispleasure of reading for a long time.

Secondly, it seems flawed in function as well as form.
__get_builtin_constructor can throw an ImportError, which seems
erroneously caught in the except (why on earth does the except span more
than the "import _hashlib"? That's bad style for precisely this reason.)
This will cause an error in the import of hashlib when there are
possibly many working hash functions already imported. Changing the:

    exec funcName + ' = __get_builtin_constructor(funcName)'
except ValueError:

to catch ImportError as well solves the problem for me.
Date User Action Args
2009-06-13 22:45:31Eloffsetrecipients: + Eloff
2009-06-13 22:45:31Eloffsetmessageid: <>
2009-06-13 22:45:29Elofflinkissue6281 messages
2009-06-13 22:45:28Eloffcreate