#NEWLINE# def drop( self , gen ) : #NEWLINE# #INDENT# ( i , ring ) = self . _drop ( gen ) #NEWLINE# if ( self . ring . ngens == 1 ) : #NEWLINE# #INDENT# if self . is_ground : #NEWLINE# #INDENT# return self . coeff ( 1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( ( "can't drop %s" % gen ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# poly = ring . zero #NEWLINE# for ( k , v ) in self . items ( ) : #NEWLINE# #INDENT# if ( k [ i ] == 0 ) : #NEWLINE# #INDENT# K = list ( k ) #NEWLINE# del K [ i ] #NEWLINE# poly [ tuple ( K ) ] = v #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( ( "can't drop %s" % gen ) ) #NEWLINE# #UNINDENT# #UNINDENT# return poly