Home | Trees | Indices | Help |
|
---|
|
object --+ | PercentageQuantity
Class representing a percentage quantity.
The percentage is maintained internally as a string so that issues of precision can be avoided. It really isn't possible to store a floating point number here while being able to losslessly translate back and forth between XML and object representations. (Perhaps the Python 2.4 Decimal class would have been an option, but I want to stay compatible with Python 2.3.)
Even though the quantity is maintained as a string, the string must be in a valid floating point positive number. Technically, any floating point string format supported by Python is allowble. However, it does not make sense to have a negative percentage in this context.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from |
|
|||
quantity Percentage value, as a string |
|||
percentage Percentage value, as a floating point number. |
|||
Inherited from |
|
PercentageQuantity class.
|
|
|
|
None .
|
|
|
quantityPercentage value, as a string
|
percentagePercentage value, as a floating point number.
|
Home | Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0beta1 on Sat Nov 15 12:16:58 2008 | http://epydoc.sourceforge.net |