#NEWLINE# def _get_init_args( self ) : #NEWLINE# #INDENT# 'Get a dictionary of instance constructor arguments.\n\n        This implementation works on classes which use the same names\n        for both constructor arguments and instance attributes.\n\n        ' #NEWLINE# try : #NEWLINE# #INDENT# signature = inspect . signature ( self . __init__ ) #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# args = inspect . getargspec ( self . __init__ ) [ 0 ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# parameters = signature . parameters #NEWLINE# args = [ arg for ( arg , p ) in parameters . items ( ) if ( p . kind is p . POSITIONAL_OR_KEYWORD ) ] #NEWLINE# #UNINDENT# return dict ( ( ( parameters , getattr ( self , arg ) ) for arg in args if ( arg != 'self' ) ) )