Printable string for 'self'
nospamformeSVP at gmail.com
Wed Mar 15 03:02:35 CET 2006
Is there a way to discover the original string form of the instance that
is represented by self in a method?
For example, if I have:
fred = C()
then I would like meth to be able to print something like:
about to call meth(fred, 27) or
about to call fred.meth(27)
about to call meth(<__main__.C instance at 0x00A9D238>, 27)
Thanks in advance,
More information about the Python-list