class Parameters(dict):
""" Some doc here """
pass
class System(object):
Parameter = Parameters
""" The default parameters attribute builder """
def __init__(self):
self.parameters = self.Parameters()
The problem is that I make autoclasssystems with a sphinx, the document parameter will not be what I wrote below Parameter = Parameters, but it will be a complete document of the Parameter class. I do not want this, it is too dirty and does not correspond to what my .Parameters attribute is valid (can be a Parameters class, as well as a function, or dict(a=0,b=1).copyetc.).
System
======
.. autoclass:: system.System
:members: __init__,Parameters
The only way I found is to first set the “No” parameter and change it during initialization, but this is not convenient for other reasons.
class System(object):
Parameter = None
""" The default parameters attribute builder """
def __init__(self):
if self.Parameters is None:
self.Parameters = Parameters
self.parameters = self.Parameters()
source
share