I hope a rewrite makes it a bit more clear for you.
The test module is defined below, it contains a simplified Error
object, it resemble the one I use a lot in my own scripting. The test
file generates an error ( A ZeroDivisionError in method eggs of class
Spam).
-#!/usr/bin/env python
-import
>You can create your own Exception class, based on this recipe:<
Thank you for your answer, the recipe you have suggested gives a very
big output, but it doesn't contain what I've asked for... :-) I was
asking to see that faulty method/function parameters (or the first line
of its docstring).
Prob
You can create your own Exception class, based on thisrecipe:
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/52215, it will
look like
-import sys, traceback
-
-class Error:
-def __init__(self, arg):
-self._arg = arg
-tb = sys.exc_info()[2]
-while 1:
-
Hello, here I extend the idea of the smart help I've discussed
recently.
When I receive an error like:
TypeError: fun() takes exactly 2 arguments (1 given)
I'd also like to see that method/function parameters (or the first line
of its docstring).
>From a discussion with gentle programmers in anot