@public
def degree(f, *gens, **args):
 options.allowed_flags(args, ['gen', 'polys'])
 try:
  (F, opt) = poly_from_expr(f, *gens, **args)
 except PolificationFailed as exc:
  raise ComputationFailed('degree', 1, exc)
 return sympify(F.degree(opt.gen))

@ public def degree ( f , * gens , ** args ) : options . allowed_flags ( args , [ 'gen' , 'polys' ] ) try : ( F , opt ) = poly_from_expr ( f , * gens , ** args ) except PolificationFailed as exc : raise ComputationFailed ( 'degree' , 1 , exc ) return sympify ( F . degree ( opt . gen ) )
return degree of single node or of nbunch of nodes .