On Mon, Jul 23, 2012 at 8:48 AM, Dan Stromberg <drsali...@gmail.com> wrote: > If a class has defined its own __repr__ method, is there a way of getting > the default repr output for that class anyway?
Methods are just functions, and you can call any method of any class with any object as its first parameter. object.__repr__(some_object) Though this mightn't work with everything. I wasn't able to paint a list as a tuple - "tuple.__repr__([1,2,3])" threw a TypeError. Oh well. There's a limit to the ways Python lets you shoot yourself in the foot. ChrisA -- http://mail.python.org/mailman/listinfo/python-list