def _convert_other(other, raiseit=False, allow_float=False):
 if isinstance(other, Decimal):
  return other
 if isinstance(other, (int, long)):
  return Decimal(other)
 if (allow_float and isinstance(other, float)):
  return Decimal.from_float(other)
 import sys
 if (sys.platform == 'cli'):
  import System
  if isinstance(other, System.Decimal):
   return Decimal(other)
 if raiseit:
  raise TypeError(('Unable to convert %s to Decimal' % other))
 return NotImplemented

def _convert_other ( other , raiseit = False , allow_float = False ) : if isinstance ( other , Decimal ) : return other if isinstance ( other , ( int , long ) ) : return Decimal ( other ) if ( allow_float and isinstance ( other , float ) ) : return Decimal . from_float ( other ) import sys if ( sys . platform == 'cli' ) : import System if isinstance ( other , System . Decimal ) : return Decimal ( other ) if raiseit : raise TypeError ( ( 'Unable to convert %s to Decimal' % other ) ) return NotImplemented
convert other to decimal .