defining __repr__

2005-09-12 Thread sven
hi list, i'd like to define __repr__ in a class to return the standardrepr a la "<__main__.A instance at 0x015B3DA0>" plus additional information. how would i have to do that? how to get the standardrepr after i've defined __repr__? sven. -- http://mail.python.org/mailman/listinfo/python-list

Re: defining __repr__

2005-09-12 Thread Steve Holden
sven wrote: > hi list, > i'd like to define __repr__ in a class to return the standardrepr > a la "<__main__.A instance at 0x015B3DA0>" > plus additional information. > how would i have to do that? > how to get the standardrepr after i've defined __repr__? > > sven. > It's relatively easy for new

Re: defining __repr__

2005-09-15 Thread Gerrit Holl
sven wrote: > i'd like to define __repr__ in a class to return the standardrepr > a la "<__main__.A instance at 0x015B3DA0>" > plus additional information. > how would i have to do that? > how to get the standardrepr after i've defined __repr__? >>> object.__repr__(4) '' Gerrit. -- Temperature