Package trac :: Module config :: Class BoolOption

Class BoolOption

source code

object --+    
         |    
    Option --+
             |
            BoolOption

Descriptor for boolean configuration options.
Instance Methods
 
accessor(self, key, default='')
Return the value of the specified option as boolean.
source code

Inherited from Option: __get__, __init__, __repr__, __set__

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Static Methods

Inherited from Option: get_registry

Class Variables

Inherited from Option: registry

Properties

Inherited from object: __class__

Method Details

accessor(self, key, default='')

source code 

Return the value of the specified option as boolean.

This method returns True if the option value is one of "yes", "true", "enabled", "on", or non-zero numbers, ignoring case. Otherwise False is returned.

Valid default input is a string or a bool. Returns a bool.

Overrides: Section.get