This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Add "Annotations Best Practices" to HOWTO
Type: enhancement Stage: resolved
Components: Documentation Versions: Python 3.10
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: larry Nosy List: JelleZijlstra, larry
Priority: normal Keywords: patch

Created on 2021-04-30 11:26 by larry, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 25746 merged larry, 2021-04-30 11:30
Messages (3)
msg392419 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2021-04-30 11:26
Dealing with annotations is complicated.  I think there should be a section of the Python documentation describing best practices for working
with annotations.  So, here goes.

The best spot I found for it was as a new HOWTO.  I added links to that HOWTO to a couple relevant glossary definitions, and one in the documentation for inspect.get_annotations().  I'm not sure if it makes sense to add any other links; I considered adding links to the HOWTO to where the __annotations__ attribute is defined on functions, modules, and classes, in reference/datamodel.rst, but it just didn't seem like a good idea.
msg392659 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2021-05-02 04:19
New changeset 49b26fa517165f991c35a4afcbef1fcb26836bec by larryhastings in branch 'master':
bpo-43987: Add "Annotations Best Practices" HOWTO doc. (#25746)
msg392672 - (view) Author: Larry Hastings (larry) * (Python committer) Date: 2021-05-02 08:22
Thanks to Jelle for an enormous amount of reviewing and re-reviewing!  That was just spiffy.
Date User Action Args
2022-04-11 14:59:44adminsetgithub: 88153
2021-05-02 08:22:39larrysetstatus: open -> closed
resolution: fixed
messages: + msg392672

stage: patch review -> resolved
2021-05-02 04:19:35larrysetmessages: + msg392659
2021-04-30 11:31:08larrysetnosy: + JelleZijlstra
2021-04-30 11:30:15larrysetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request24436
2021-04-30 11:26:13larrycreate