How do I know all thrown exceptions of a function?
Delaney, Timothy
tdelaney at avaya.com
Wed Jan 24 18:05:45 EST 2001
> > Argh! From a practical viewpoint, this is the way to do it,
> but from an
> > aesthetic viewpoint ...
>
> Clearly, aesthetic is in the eye of the beholder! To me, this
> seems just a special case of optional type-annotation: failing
> to annotate SHOULD mean "and I'm not providing ANY information
> about what types this thing here can be" -- both for compatibility
> with existing Python, AND because it keeps the RAD, uncluttered,
> fast-to-write-and-easy-to-read, nature of our beloved language;
> one then goes back and OPTIONALLY AND SELECTIVELY annotates "SOME
> portions to taste" with type information, including "this function
> always returns a sequence" or "this function never raises any
> exception".
>
> Pragmatics and aesthetics are thus quite aligned here, from my
> personal viewpoint.
You are of course right ... when I seriously consider this from a python
point of view unadorned things should be "I have no information at this
time" and adorning should increase restrictions.
Tim Delaney
Avaya Australia
More information about the Python-list
mailing list