I have seen the following statement in a number of docstrings when help()
ing a class: "See help(type(self))
for accurate signature."
Notably, it is in the help()
for scipy.stats.binom.__init__
and for stockfish.Stockfish.__init__
at the very least. I assume, therefore, that it is some sort of stock message.
In any case, I can't figure out what the heck it means. Is this useful information? Note that, being "outside" of the class, so to speak, I never have access to self
. Furthermore, it is impossible to instantiate a class if I cannot access the signature of the __init__
method, and can therefore not even do help(type(my_object_instantiated))
. Its a catch 22. In order to use __init__
, I need the signature for __init__
, but in order to read the signature for __init__
, I need to instantiate an object with __init__
. This point is strictly academic however, for even when I do manage to instantiate a scipy.stats.binom
, it actually returns an object of an entirely different class, rv_frozen
, with the exact same message in its __init__
docstring, but whose signature is entirely different and entirely less useful. In other words, help(type(self))
actually does not give an accurate signature. It is useless.
Does anyone know where this message comes from, or what I'm supposed to make of it? Is it just stock rubbish from a documentation generator, or am I user-erroring?