Module interval :: Class Smallest
[show private | hide private]
[frames | no frames]

Class Smallest


Represents the smallest value

This type doesn't do much; it implements a pseudo-value that's smaller than everything but itself.
>>> negInf = Smallest()
>>> smallest = Smallest()
>>> -264 < negInf
False

>>> -264 == negInf
False

>>> -264 > negInf
True

>>> negInf < negInf
False

>>> negInf == smallest
True

Method Summary
  __cmp__(self, other)
Compares this with another object
  __hash__(self)
Returns a value that can be used for generating hashes
  __neg__(self)
Returns the largest value
  __repr__(self)
Returns an evaluable representation of the object
  __str__(self)
Returns a printable representation of this value

Method Details

__cmp__(self, other)
(Comparison operator)

Compares this with another object

Always indicates that self is less than other, unless both are of type Smallest, in which case they are equal.
>>> 0 < Smallest()
False

>>> -9999999 < Smallest()
False

>>> Smallest() < -9999999
True

>>> Smallest() < Smallest()
False

>>> Smallest() == Smallest()
True

__hash__(self)
(Hashing function)

Returns a value that can be used for generating hashes

__neg__(self)

Returns the largest value

The opposite of negative infinity is infinity, the largest value.
>>> print -Smallest()
~

__repr__(self)
(Representation operator)

Returns an evaluable representation of the object

The representation of the smallest number is -Inf, which means negative infinity.
>>> Smallest()
-Inf

__str__(self)
(Informal representation operator)

Returns a printable representation of this value

The string for the smallest number is -~, which means negative infinity.
>>> print Smallest()
-~

Generated by Epydoc 2.1 on Wed Nov 9 22:22:37 2005 http://epydoc.sf.net