[docs] [issue32766] 4.7.7. Function Annotations

Terry J. Reedy report at bugs.python.org
Fri Feb 9 19:51:24 EST 2018

Terry J. Reedy <tjreedy at udel.edu> added the comment:

3.5 and its docs are frozen except for security patches.  The 3.7 doc is identical.

The sentence refers to the def statement and perhaps should say so.  It should end with 'a required argument, an optional argument, and the return value annotated'.  Or maybe better, 'annotations for ... and the return value.'

In 3.6, cpython dicts became (unofficially) input ordered.  In 3.7, this became official for Python dicts.  The example output should be changed to what it is now.  (This is an example where the change produces better output.)

Annotations: {'ham': <class 'str'>, 'eggs': <class 'str'>, 'return': <class 'str'>}

nosy: +terry.reedy
versions: +Python 3.6, Python 3.7, Python 3.8 -Python 3.5

Python tracker <report at bugs.python.org>

More information about the docs mailing list