| 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 originally wanted 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  | |||
| 
 | |||
| 
 Constructor for the  
 | 
| 
 Official string representation for class instance. 
 | 
| 
 Informal string representation for class instance. 
 | 
| 
 Definition of equals operator for this class. Lists within this class are "unordered" for equality comparisons. 
 | 
| 
 Property target used to set the quantity The value must be a non-empty
  string if it is not  
 | 
| 
 Property target used to get the quantity as a floating point number. If there is no quantity set, then a value of 0.0 is returned. | 
| 
 | |||
| quantityPercentage value, as a string 
 | 
| percentagePercentage value, as a floating point number. 
 | 
| Home | Trees | Indices | Help | 
 | 
|---|
| Generated by Epydoc 3.0.1 | http://epydoc.sourceforge.net |