How to validate the __init__ parameters

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


On Mon, Jan 4, 2010 at 10:17 AM, Albert van der Horst
<albert at spenarnc.xs4all.nl> wrote:
<snip>
> 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.

Cheers,
Chris
--
http://blog.rebertia.com



More information about the Python-list mailing list