[IPython-User] class decorators in class introspection: MyClass??

Nikolas Tezak ntezak@stanford....
Mon Aug 27 15:16:24 CDT 2012

Hi there, 
I was wondering if there was some way to reconfigure IPython's "display source"-functionality such that it shows class decorators.
Say I have:

def changeSomething(cls):
	cls.something_changed = True

class MyClass(object):

Then, in ipython, 


will start printing the source with the first line being

'class MyClass(object):'

Wouldn't it make sense to print any existing decorators above the class definition, too?


More information about the IPython-User mailing list