Package picalo :: Package base :: Module Currency :: Class currency
[show private | hide private]
[frames | no frames]

Type currency

object --+        
         |        
   Decimal --+    
             |    
        number --+
                 |
                currency


A simple extension to number to deliniate a currency type. In future versions, we'll make this class support the currencies from around the world.
Method Summary
  __new__(self, value)
(Static method)
    Inherited from number
  __repr__(self)
Returns a string representation of this number
    Inherited from Decimal
  __abs__(self, round, context)
Returns the absolute value of self.
  __add__(self, other, context)
Returns self + other.
  __cmp__(self, other, context)
  __copy__(self)
  __deepcopy__(self, memo)
  __div__(self, other, context)
Return self / other.
  __divmod__(self, other, context)
(self // other, self % other)
  __eq__(self, other)
  __float__(self)
Float representation.
  __floordiv__(self, other, context)
self // other
  __hash__(self)
x.__hash__() <==> hash(x)
  __int__(self)
Converts self to an int, truncating if necessary.
  __long__(self)
Converts to a long.
  __mod__(self, other, context)
self % other
  __mul__(self, other, context)
Return self * other.
  __ne__(self, other)
  __neg__(self, context)
Returns a copy with the sign switched.
  __nonzero__(self)
Is the number non-zero?
  __pos__(self, context)
Returns a copy, unless it is a sNaN.
  __pow__(self, n, modulo, context)
Return self ** n (mod modulo)
  __radd__(self, other, context)
Returns self + other.
  __rdiv__(self, other, context)
Swaps self/other and returns __div__.
  __rdivmod__(self, other, context)
Swaps self/other and returns __divmod__.
  __reduce__(self)
  __rfloordiv__(self, other, context)
Swaps self/other and returns __floordiv__.
  __rmod__(self, other, context)
Swaps self/other and returns __mod__.
  __rmul__(self, other, context)
Return self * other.
  __rpow__(self, other, context)
Swaps self/other and returns __pow__.
  __rsub__(self, other, context)
Return other + (-self)
  __rtruediv__(self, other, context)
Swaps self/other and returns __div__.
  __str__(self, eng, context)
Return string representation of the number in scientific notation.
  __sub__(self, other, context)
Return self + (-other)
  __truediv__(self, other, context)
Return self / other.
  adjusted(self)
Return the adjusted exponent of self
  as_tuple(self)
Represents the number as a triple tuple.
  compare(self, other, context)
Compares one to another.
  max(self, other, context)
Returns the larger value.
  min(self, other, context)
Returns the smaller value.
  normalize(self, context)
Normalize- strip trailing 0s, change anything equal to 0 to 0e0
  quantize(self, exp, rounding, context, watchexp)
Quantize self so its exponent is the same as that of exp.
  remainder_near(self, other, context)
Remainder nearest to 0- abs(remainder-near) <= other/2
  same_quantum(self, other)
Test whether self and other have the same exponent.
  sqrt(self, context)
Return the square root of self.
  to_eng_string(self, context)
Convert to engineering-type string.
  to_integral(self, rounding, context)
Rounds to the nearest integer, without raising inexact, rounded.
    Inherited from object
  __init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __reduce_ex__(...)
helper for pickle
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value

Class Variable Summary
    Inherited from Decimal
tuple __slots__ = ('_exp', '_int', '_sign', '_is_special')

Generated by Epydoc 2.1 on Mon Aug 20 05:38:17 2007 http://epydoc.sf.net