What Exceptions are there? (was: "a better input")
Louis M. Pecora
pecora at anvil.nrl.navy.mil
Fri May 10 10:23:45 EDT 2002
In article <abe9us$kn5$1 at slb6.atl.mindspring.net>, Andrew Dalke
<dalke at dalkescientific.com> wrote:
> > def isThisAComplexLiteral(this):
> > try: complex(this)
> > except: return False
> > else: return True
>
> Minor point. "except ValueError:" instead of "except:" as in
Ok, you knew there was an exception of that type (ValueError), but is
there a way to get a list of exceptions in a Python module or in the
main Python core? There are probably zillions. No? How does one know
what exceptions exist, i.e. what the programmer was thinking at the
time?
--
-- Lou Pecora
- My views are my own.
More information about the Python-list
mailing list