inClass¶
- 
lsst.utils.inClass(cls, name=None)¶ Add the decorated function to the given class as a method.
For example:
.. code-block:: python
- class Foo:
 - pass
 
@inClass(Foo) def run(self):
return Noneis equivalent to:
.. code-block:: python
- class Foo:
 - def run(self):
 - return None
 
Standard decorators like
classmethod,staticmethod, andpropertymay be used after this decorator. Custom decorators may only be used if they return an object with a__name__attribute or thenameoptional argument is provided.