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
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.
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