@@ -252,13 +252,21 @@ The sections of a function's docstring are:
252
252
Support for the **Yields ** section was added in `numpydoc
253
253
<https://github.com/numpy/numpydoc> `_ version 0.6.
254
254
255
- 7. **Other Parameters **
255
+ 7. **Receives **
256
+
257
+ Explanation of parameters passed to a generator's ``.send() `` method,
258
+ formatted as for Parameters, above. Since, like for Yields and Returns, a
259
+ single object is always passed to the method, this may describe either the
260
+ single parameter, or positional arguments passed as a tuple. If a docstring
261
+ includes Receives it must also include Yields.
262
+
263
+ 8. **Other Parameters **
256
264
257
265
An optional section used to describe infrequently used parameters.
258
266
It should only be used if a function has a large number of keyword
259
267
parameters, to prevent cluttering the **Parameters ** section.
260
268
261
- 8 . **Raises **
269
+ 9 . **Raises **
262
270
263
271
An optional section detailing which errors get raised and under
264
272
what conditions::
@@ -271,16 +279,16 @@ The sections of a function's docstring are:
271
279
This section should be used judiciously, i.e., only for errors
272
280
that are non-obvious or have a large chance of getting raised.
273
281
274
- 9 . **Warns **
282
+ 10 . **Warns **
275
283
276
284
An optional section detailing which warnings get raised and
277
285
under what conditions, formatted similarly to Raises.
278
286
279
- 10 . **Warnings **
287
+ 11 . **Warnings **
280
288
281
289
An optional section with cautions to the user in free text/reST.
282
290
283
- 11 . **See Also **
291
+ 12 . **See Also **
284
292
285
293
An optional section used to refer to related code. This section
286
294
can be very useful, but should be used judiciously. The goal is to
@@ -319,7 +327,7 @@ The sections of a function's docstring are:
319
327
func_b, func_c_, func_d
320
328
func_e
321
329
322
- 12 . **Notes **
330
+ 13 . **Notes **
323
331
324
332
An optional section that provides additional information about the
325
333
code, possibly including a discussion of the algorithm. This
@@ -364,7 +372,7 @@ The sections of a function's docstring are:
364
372
where filename is a path relative to the reference guide source
365
373
directory.
366
374
367
- 13 . **References **
375
+ 14 . **References **
368
376
369
377
References cited in the **notes ** section may be listed here,
370
378
e.g. if you cited the article below using the text ``[1]_ ``,
@@ -397,7 +405,7 @@ The sections of a function's docstring are:
397
405
398
406
.. highlight :: pycon
399
407
400
- 14 . **Examples **
408
+ 15 . **Examples **
401
409
402
410
An optional section for examples, using the `doctest
403
411
<http://docs.python.org/library/doctest.html> `_ format.
0 commit comments