Login and get codingYour team uses
Sphinx
and wants you to comply with its standards fordocstring
s. As per the Sphinx-RTD-Tutorial a typicalSphinx
docstring has the following format:"""[Summary] :param [ParamName]: [ParamDescription], defaults to [DefaultParamVal] :type [ParamName]: [ParamType](, optional) ... :raises [ErrorType]: [ErrorDescription] ... :return: [ReturnDescription] :rtype: [ReturnType] """Based on this format and using the literal strings in italics below, write a docstring for
sum_numbers
that:
- has Sums numbers for the Summary part,
- receives numbers: a list of numbers (type:
list
),- raises a TypeError: if not all numeric values passed in,
- and returns sum of numbers (type:
int
)There's no need to implement the function (leave the
pass
in) as this is about writing the properdocstring
.Note:We will be adding annotations to this function in the next Bite so you will need to complete this Bite to unlock the next.
265 out of 270 users completed this Bite.
Will you be the 266th person to crack this Bite?
Resolution time: ~24 min. (avg. submissions of 5-240 min.)
Our community rates this Bite 1.5 on a 1-10 difficulty scale.
» You can do it! 😌