View source on GitHub |
A metaclass extending abc.ABCMeta
for defining flexible abstract base classes
cirq.ABCMetaImplementAnyOneOf(
name, bases, namespace, **kwargs
)
This metadata allows the declaration of an abstract base classe (ABC) with more flexibility in which methods must be overridden.
Use this metaclass in the same way as abc.ABCMeta
to create an ABC.
In addition to the decorators in theabc
module, the decorator
@alternative(...)
may be used.
Methods
register
register(
subclass
)
Register a virtual subclass of an ABC.
Returns the subclass, to allow usage as a class decorator.