Python‎ > ‎decimal‎ > ‎

Decimal.number_class()


Definition
Return a string describing the class of the 
 operand.

Syntax
Decimal(x).number_class()

Syntax
x=string

Examples
The return is:
 >>> Decimal('infinity').number_class()
'+Infinity'

>>> Decimal('0').number_class()
'+Zero'

>>> Decimal('-1').number_class()
'-Normal'

>>> Decimal('100').number_class()
'+Normal'
>>> 

Comments