![]() |
App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
|
Public Member Functions | |
def | __new__ |
def | __eq__ |
def | __ne__ |
def | __hash__ |
def | __repr__ |
def | is_configuration |
def | merge |
def | __getstate__ |
def | __setstate__ |
A base class for a configuration object. Subclasses should provide validation functions for every configuration option they accept. Any public function decorated with ConfigOption is assumed to be a validation function for an option of the same name. All validation functions take a single non-None value to validate and must throw an exception or return the value to store. This class forces subclasses to be immutable and exposes a read-only property for every accepted configuration option. Configuration options set by passing keyword arguments to the constructor. The constructor and merge function are designed to avoid creating redundant copies and may return the configuration objects passed to them if appropriate. Setting an option to None is the same as not specifying the option except in the case where the 'config' argument is given. In this case the value on 'config' of the same name is ignored. Options that are not specified will return 'None' when accessed.
def google.appengine.datastore.datastore_rpc.BaseConfiguration.__new__ | ( | cls, | |
config = None , |
|||
kwargs | |||
) |
Immutable constructor. If 'config' is non-None all configuration options will default to the value it contains unless the configuration option is explicitly set to 'None' in the keyword arguments. If 'config' is None then all configuration options default to None. Args: config: Optional base configuration providing default values for parameters not specified in the keyword arguments. **kwargs: Configuration options to store on this object. Returns: Either a new Configuration object or (if it would be equivalent) the config argument unchanged, but never None.
def google.appengine.datastore.datastore_rpc.BaseConfiguration.is_configuration | ( | cls, | |
obj | |||
) |
True if configuration obj handles all options of this class. Use this method rather than isinstance(obj, cls) to test if a configuration object handles the options of cls (is_configuration is handled specially for results of merge which may handle the options of unrelated configuration classes). Args: obj: the object to test.
def google.appengine.datastore.datastore_rpc.BaseConfiguration.merge | ( | self, | |
config | |||
) |
Merge two configurations. The configuration given as an argument (if any) takes priority; defaults are filled in from the current configuration. Args: config: Configuration providing overrides, or None (but cannot be omitted). Returns: Either a new configuration object or (if it would be equivalent) self or the config argument unchanged, but never None. Raises: BadArgumentError if self or config are of configurations classes with conflicting options (i.e. the same option name defined in two different configuration classes).