[Python-Dev] questionable try/except in anydbm.py

Martin v. Loewis martin@v.loewis.de
18 Mar 2002 08:32:36 +0100


Skip Montanaro <skip@pobox.com> writes:

>     try:
>         class error(Exception):
>             pass
>     except (NameError, TypeError):
>         error = "anydbm.error"
> 
> Is this sort of construct really necessary?

Please simplify. If that ever causes an exception, I'd prefer to know
about it.

Regards,
Martin