class documentation
class Tristate(object):
Tri-state value: on, off or auto
| Method | __init__ |
Undocumented |
| Method | __nonzero__ |
No summary |
| Method | __repr__ |
No summary |
| Method | do |
Run function if tristate is on or auto, only report a failure if tristate is on since failing is o.k. for autodetect. |
| Method | is |
Undocumented |
| Method | is |
Undocumented |
| Method | is |
Undocumented |
| Constant | AUTO |
Undocumented |
| Constant | OFF |
Undocumented |
| Constant | ON |
Undocumented |
| Property | state |
Get current state |
| Constant | _VALID |
Undocumented |
| Instance Variable | _state |
Undocumented |
>>> Tristate('on').__nonzero__() True >>> Tristate('auto').__nonzero__() True >>> Tristate('off').__nonzero__() False
>>> Tristate('on').__repr__() 'on' >>> Tristate(True).__repr__() 'on' >>> Tristate(False).__repr__() 'off' >>> Tristate('auto').__repr__() 'auto'