Doc-comment class Doc2Vec only via __init__ method #2607
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For consideration/discussion: having both a class doc-comment, and an
__init__
method doc-comment, means both are stitched together in HTML docs (https://radimrehurek.com/gensim/models/doc2vec.html#gensim.models.doc2vec.Doc2Vec), and the parameter-details that every user needs to consult wind up below the confusing mess of internal-attributes that hardly anyone cares about. Google's Python doc-comment conventions suggest that a class and its parameters can be documented either under the class declaration, or under the__init__
method, but not split between both. (See, eg: https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html). Here I've moved the notes about the class under__init__()
, as that seems to get the most important info – init parameters - to where both code- and doc- readers will most easily find it.