Bases: object
Science state subclasses are used to manage global items that can affect science results. Subclasses will generally override validate
to convert from any of the acceptable inputs (such as strings) to the appropriate internal objects, and set an initial value to the _value
member so it has a default.
Examples
class MyState(ScienceState): @classmethod def validate(cls, value): if value not in ('A', 'B', 'C'): raise ValueError("Must be one of A, B, C") return value
Methods Summary
Methods Documentation
Get the current science state value.
Set the current science state value.
Validate the value and convert it to its native type, if necessary.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4