Typeclass :: Number

The Number typeclass is intended to free you from caring about the exact type of the numbers moving in and out of your functions, so long as they conform to the numeric protocol. Number is an amalgam of the following built-in types:

Bet you didn't know bool implements just about all of the numeric protocol?

In addition, if your version of Python includes the decimal module, the decimal.Decimal object will be added to the typeclass automatically.

Please consult the documentation on the Typeclass() class for more information.

Valid XHTML 1.0 Transitional