Re: Dumping an instance

2005-03-15 Thread Peter Hansen
gf gf wrote: If I want to dump (for debugging) an instance and all of it's member attributes, what's the simplest way? print myInstance just gives a pointer to its location in memory Roughly speaking, as a starting point: from pprint import pformat def dump(obj): print repr(obj) for name in

Re: Dumping an instance

2005-03-15 Thread Roy Smith
In article <[EMAIL PROTECTED]>, gf gf <[EMAIL PROTECTED]> wrote: > If I want to dump (for debugging) an instance and all > of it's member attributes, what's the simplest way? > > print myInstance > > just gives a pointer to its location in memory You need to write a str() method for the class.

Dumping an instance

2005-03-15 Thread gf gf
If I want to dump (for debugging) an instance and all of it's member attributes, what's the simplest way? print myInstance just gives a pointer to its location in memory Thanks! __ Do you Yahoo!? Yahoo! Mail - 250MB free storage. Do more. Ma