def __sympifyit(func, arg, retval=None):
 if (not get_function_code(func).co_argcount):
  raise LookupError('func not found')
 assert (get_function_code(func).co_varnames[1] == arg)
 if (retval is None):
  @wraps(func)
  def __sympifyit_wrapper(a, b):
   return func(a, sympify(b, strict=True))
 else:
  @wraps(func)
  def __sympifyit_wrapper(a, b):
   try:
    if (not hasattr(b, '_op_priority')):
     b = sympify(b, strict=True)
    return func(a, b)
   except SympifyError:
    return retval
 return __sympifyit_wrapper

def __sympifyit ( func , arg , retval = None ) : if ( not get_function_code ( func ) . co_argcount ) : raise LookupError ( 'func not found' ) assert ( get_function_code ( func ) . co_varnames [ 1 ] == arg ) if ( retval is None ) : @ wraps ( func ) def __sympifyit_wrapper ( a , b ) : return func ( a , sympify ( b , strict = True ) ) else : @ wraps ( func ) def __sympifyit_wrapper ( a , b ) : try : if ( not hasattr ( b , '_op_priority' ) ) : b = sympify ( b , strict = True ) return func ( a , b ) except SympifyError : return retval return __sympifyit_wrapper
decorator to _sympify arg argument for function func dont use directly -- use _sympifyit instead .