Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "Annotations Best Practices" to HOWTO #88153

Closed
larryhastings opened this issue Apr 30, 2021 · 3 comments
Closed

Add "Annotations Best Practices" to HOWTO #88153

larryhastings opened this issue Apr 30, 2021 · 3 comments
Assignees
Labels
3.10 only security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@larryhastings
Copy link
Contributor

BPO 43987
Nosy @larryhastings, @JelleZijlstra
PRs
  • bpo-43987: Add "Annotations Best Practices" HOWTO doc. #25746
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = 'https://github.com/larryhastings'
    closed_at = <Date 2021-05-02.08:22:39.990>
    created_at = <Date 2021-04-30.11:26:13.887>
    labels = ['type-feature', '3.10', 'docs']
    title = 'Add "Annotations Best Practices" to HOWTO'
    updated_at = <Date 2021-05-02.08:22:39.990>
    user = 'https://github.com/larryhastings'

    bugs.python.org fields:

    activity = <Date 2021-05-02.08:22:39.990>
    actor = 'larry'
    assignee = 'larry'
    closed = True
    closed_date = <Date 2021-05-02.08:22:39.990>
    closer = 'larry'
    components = ['Documentation']
    creation = <Date 2021-04-30.11:26:13.887>
    creator = 'larry'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 43987
    keywords = ['patch']
    message_count = 3.0
    messages = ['392419', '392659', '392672']
    nosy_count = 2.0
    nosy_names = ['larry', 'JelleZijlstra']
    pr_nums = ['25746']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue43987'
    versions = ['Python 3.10']

    @larryhastings
    Copy link
    Contributor Author

    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.

    @larryhastings larryhastings added the 3.10 only security fixes label Apr 30, 2021
    @larryhastings larryhastings self-assigned this Apr 30, 2021
    @larryhastings larryhastings added docs Documentation in the Doc dir type-feature A feature request or enhancement 3.10 only security fixes labels Apr 30, 2021
    @larryhastings larryhastings self-assigned this Apr 30, 2021
    @larryhastings larryhastings added docs Documentation in the Doc dir type-feature A feature request or enhancement labels Apr 30, 2021
    @larryhastings
    Copy link
    Contributor Author

    New changeset 49b26fa by larryhastings in branch 'master':
    bpo-43987: Add "Annotations Best Practices" HOWTO doc. (bpo-25746)
    49b26fa

    @larryhastings
    Copy link
    Contributor Author

    Thanks to Jelle for an enormous amount of reviewing and re-reviewing! That was just spiffy.

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.10 only security fixes docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant