#NEWLINE# def extract_contracts( self , method ) : #NEWLINE# #INDENT# contracts = [ ] #NEWLINE# for line in method . __doc__ . split ( '\n' ) : #NEWLINE# #INDENT# line = line . strip ( ) #NEWLINE# if line . startswith ( '@' ) : #NEWLINE# #INDENT# ( name , args ) = re . match ( '@(\\w+)\\s*(.*)' , line ) . groups ( ) #NEWLINE# args = re . split ( '\\s+' , args ) #NEWLINE# contracts . append ( self . contracts [ name ] ( method , * args ) ) #NEWLINE# #UNINDENT# #UNINDENT# return contracts