I'd like to document what T
means in this class
from typing import Generic, TypeVar
T = TypeVar('T')
class A(Generic[T]):
pass
I could document T
with T.__doc__ = "Represents ..."
but I might want to use T
it in several unrelated classes.
Is there any standard way to document it for a given class/function etc? Ideally using sphinx & reST.
I'm thinking something at the same level as sphinx's :param:
, but for types, along the lines of scaladoc's @tparam