ConstructorMethod

Defined in module: wield.control.utilities.ConstructorMethod

class ConstructorMethod(method)[source][github]

Bases: object

This is a python descriptor class, to be used as a decorator

@constructormethod def __init_method__(self, *args, **kw):

self.abc = 123 return

This decorator allows a method to be used either as a classmethod or as an instance method. Both will do the same thing, but if used by a class, it will create and instance with __new__ and then return it

__init__(method)[source][github]

Methods

__init__(method)