You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For numpydoc: What is the convention for parameter type if a parameter is an instance of specific class, e.g. datetime.datetime?
Specifically, I have a parameter which can be either a float, datetime.date, or datetime.datetime. How should I write this in the parameter section?
my_param : float or date or datetime
my_param : float or datetime.date or datetime.datetime
my_param : float or :class:datetime.date or :class:datetime.datetime
my_param : float or :class:~datetime.date or :class:~datetime.datetime
something else?
And of course, maybe a comma instead of the first "or", but that's nitpicking (which I like by the way) and not too important in this context (unless I'm mistaken).
The text was updated successfully, but these errors were encountered:
cmeeren
changed the title
Convention when input can be an instance of a class
numpydoc convention when input can be an instance of a class
Nov 20, 2015
For numpydoc: What is the convention for parameter type if a parameter is an instance of specific class, e.g. datetime.datetime?
Specifically, I have a parameter which can be either a float, datetime.date, or datetime.datetime. How should I write this in the parameter section?
datetime.date
or :class:datetime.datetime
~datetime.date
or :class:~datetime.datetime
And of course, maybe a comma instead of the first "or", but that's nitpicking (which I like by the way) and not too important in this context (unless I'm mistaken).
The text was updated successfully, but these errors were encountered: