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
We should define a standard way of writing doc strings.
Suggestion 1
defmy_positive_divider(dividend: float, divisor: float) ->float:
""" Divides the dividend by the divisor and returns the quotient. Only positive numbers are supported for no reason. Args: dividend (float): The number which is divided divisor (float): The number which is used to divide Returns: float: The result (quotient) Raises: ArithmeticError: When a negative number is supplied ZeroDivisionError: When the divisor is zero # should we include inherited Exceptions? """ifdividend<0ordivisor<0:
raiseArithmeticError("Only positive numbers are supported!")
quotient: float=dividend/divisorreturnquotient
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
We should define a standard way of writing doc strings.
Suggestion 1
A few other formats are listed here under "Docstring Formats": https://marketplace.visualstudio.com/items?itemName=njpwerner.autodocstring
Beta Was this translation helpful? Give feedback.
All reactions