Package gavo :: Package utils :: Module fancyconfig :: Class FloatConfigItem
[frames] | no frames]

Class FloatConfigItem

source code

object --+    
         |    
ConfigItem --+
             |
            FloatConfigItem

A config item containing a float.

It supports a Null value through the special None literal.

>>> ci = FloatConfigItem("foo"); print ci.value
None
>>> ci = FloatConfigItem("foo", default="23"); ci.value
23.0
>>> ci.set("42.25"); ci.value
42.25
>>> ci.getAsString()
'42.25'
Instance Methods

Inherited from ConfigItem: __init__, getAsString, set

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  typedesc = 'floating point value'
  default = 'None'
Properties

Inherited from object: __class__