- sncosmo.register(instance, name=None, data_class=None, force=False)¶
Register a class instance.
The object to be registered.
- namestr, optional
None, the name is taken from the
nameattribute of the instance, if it exists and is a string.
- data_classclassobj, optional
If given, the instance is registered as an instance of this class rather the the class of the instance itself. Use this for registering subclasses when you wish them to be accessible from their superclass.
- forcebool, optional
Whether to override any existing instance of the same name. Note: this may not play well with versioned instances.