#NEWLINE# def _print_MatrixSlice( self , expr ) : #NEWLINE# #INDENT# def strslice( x ) : #NEWLINE# #INDENT# x = list ( x ) #NEWLINE# if ( x [ 2 ] == 1 ) : #NEWLINE# #INDENT# del x [ 2 ] #NEWLINE# #UNINDENT# if ( x [ 1 ] == ( x [ 0 ] + 1 ) ) : #NEWLINE# #INDENT# del x [ 1 ] #NEWLINE# #UNINDENT# if ( x [ 0 ] == 0 ) : #NEWLINE# #INDENT# x [ 0 ] = '' #NEWLINE# #UNINDENT# return ':' . join ( map ( self . _print , x ) ) #NEWLINE# #UNINDENT# return ( ( ( ( ( self . _print ( expr . parent ) + '[' ) + strslice ( expr . rowslice ) ) + ', ' ) + strslice ( expr . colslice ) ) + ']' )