How to validate the __init__ parameters

Chris Rebert clp2 at
Mon Jan 4 18:47:06 CET 2010

On Mon, Jan 4, 2010 at 10:17 AM, Albert van der Horst
<albert at> wrote:
> This triggers a question: I can see the traceback, but it
> would be much more valuable, if I could see the arguments
> passed to the functions. Is there a tool?

print(locals()) #this actually gives the bindings for the entire local namespace
#but is less work than writing something more precise by hand.

It is amazing how handy the humble print() function/statement is when debugging.


More information about the Python-list mailing list