Hi Gregor,
Maybe the module traceback could help you here.
It has same functions to extract the actual stack of the program.
HTH Ewald
Gregor Lingl wrote:
> Hi all,
>
> I've a class with a lot of methods, for which I'd like to check argument
> types.
> To show you, what I mean, I've written
Gregor Lingl wrote:
> Hi all,
>
> I've a class with a lot of methods, for which I'd like to check argument
> types.
You're not the first person to want to do this. You might be interested
in these:
http://www.artima.com/weblogs/viewpost.jsp?thread=155123
http://www.python.org/dev/peps/pep-0246
Hi all,
I've a class with a lot of methods, for which I'd like to check argument types.
To show you, what I mean, I've written a prototype I'm not really content with.
It goes like this (a bit revised in order to have short codelines (*mail* ;-)):
class BadArgError(Exception):
def __init__(