pafo 0.1 released
Daneel Yaitskov
rtfm.rtfm.rtfm at gmail.com
Mon Jul 5 18:19:20 CEST 2010
Hi All,
pafo is a help debug library. it allows programmer to observer data
fields' state of a complex object or a bundle of objects. Even if some
objects in the bundle haven't __str__ or __repr__ methods. Such
situation is very usual. Nobody want to writer code only that to print
the state of an object two-three times.
It provides one function - printObject.
You can use it as follows:
>>> from pafo import *
>>> printObject( [ 1,2,3] )
[ 1 :: int, 2 :: int, 3 :: int ]
>>> class A:
... field = 3
...
>>> printObject( [ 1,2,3, A()] )
[ 1 :: int, 2 :: int, 3 :: int,
class A:
field = 3 :: int
]
>>> class B:
... field2 = A()
... listField = [ 1,2,2,4,A()]
...
>>> printObject( [ 1,2,B(),3, A()] )
[ 1 :: int, 2 :: int,
class B:
field2 = class A:
field = 3 :: int
listField = [ 1 :: int, 2 :: int, 2 :: int, 4 :: int,
class A:
field = 3 :: int
]
, 3 :: int,
class A:
field = 3 :: int
]
>>>
Module can be downloaded from:
http://daneel0yaitskov.000space.com/pafo-0.1.tar.gz
More information about the Python-announce-list
mailing list