#NEWLINE# def __init__( self , * args , **kwargs ) : #NEWLINE# #INDENT# self . args = args #NEWLINE# try : #NEWLINE# #INDENT# self . input = args [ 0 ] . input #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . output = args [ ( - 1 ) ] . output #NEWLINE# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# if ( not kwargs . get ( 'check_consistency' , True ) ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# for x in range ( ( len ( args ) - 1 ) ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# if ( args [ x ] . output != args [ ( x + 1 ) ] . input ) : #NEWLINE# #INDENT# raise TypeError ( ( 'The format chaining is not valid, %s expect %sbut %s provide %s' % ( args [ x ] . __class__ . __name__ , args [ x ] . input , args [ ( x + 1 ) ] . __class__ . __name__ , args [ ( x + 1 ) ] . output ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# except AttributeError : #NEWLINE# #INDENT# pass