bundles / astropy 7.0.1 / astropy / utils / state / ScienceState
class
astropy.utils.state:ScienceState
source: /astropy/utils/state.py :29
Signature
class ScienceState ( ) Members
Summary
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 valueAliases
-
astropy.utils.state.ScienceState