We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How do doc strings work with several methods? It would be nice to put different doc strings in different methods. I don't think this works.
Is there a recommended way then ? Maybe put one big doc string in the first method?
The text was updated successfully, but these errors were encountered:
Hey @jlapeyre!
Currently, the docstring of the first definition of a function is used. Example:
from plum import dispatch @dispatch def f(x: str): """Do something.""" pass @dispatch def f(x: int): """Do more.""" pass print(f.__doc__) # "Do something."
Ideally, all docstrings would be appended in some sane way. E.g., for the above example, f.__doc__ would ideally be
f.__doc__
f(x: str) Do something. — f(x: int) Do more.
I've tagged this issue as a feature request. I think this would be a nice improvement!
Sorry, something went wrong.
Successfully merging a pull request may close this issue.
How do doc strings work with several methods? It would be nice to put different doc strings in different methods. I don't think this works.
Is there a recommended way then ? Maybe put one big doc string in the first method?
The text was updated successfully, but these errors were encountered: