GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — The term "typechecks" is confusingly used as an adjective · Issue #96130 · python/cpython

The term "typechecks" is confusingly used as an adjective #96130

New issue
Copy link
New issue
Copy link
Closed
Closed
The term "typechecks" is confusingly used as an adjective#96130
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dirtopic-typing

Description

@ketozhang
ketozhang
opened on Aug 19, 2022
Issue body actions

Documentation

Arguably to new eyes, you can mistaken "typecheck" to be a verb meaning "to do type checking". I understand this term came from the C function TypeCheck that returns a boolean.

Activity

  1. ketozhang
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on Aug 19, 2022
  2. ketozhang commented on Aug 19, 2022

    @ketozhang
    ketozhang
    on Aug 19, 2022
    Author
    More actions

    It's particular confusing in NewType https://docs.python.org/3.10/library/typing.html#newtype

    The static type checker will treat the new type as if it were a subclass of the original type. This is useful in helping catch logical errors:

    def get_user_name(user_id: UserId) -> str:
        ...
    
    # typechecks
    user_a = get_user_name(UserId(42351))
    
    # does not typecheck; an int is not a UserId
    user_b = get_user_name(-1)

    The last two line may mean, the type checker skips checking this line.

  3. AlexWaygood
    added
    topic-typing
    on Aug 19, 2022
  4. ericvsmith commented on Aug 19, 2022

    @ericvsmith
    ericvsmith
    on Aug 19, 2022
    Member
    More actions

    Do you have a proposal to improve this? I think it’s okay as-is, but if you can make it better that would be good.

  5. ketozhang commented on Aug 22, 2022

    @ketozhang
    ketozhang
    on Aug 22, 2022
    Author
    More actions

    I believe "Passes type checking" and "Fails type checking" is very clear.

  6. ericvsmith commented on Aug 22, 2022

    @ericvsmith
    ericvsmith
    on Aug 22, 2022
    Member
    More actions

    I believe "Passes type checking" and "Fails type checking" is very clear.

    Agreed!

  7. hauntsaninja
    added a commit that references this issue on Oct 10, 2022

    pythongh-96130: Rephrase use of "typecheck" verb for clarity

    48ddbb2
  8. JelleZijlstra
    added a commit that references this issue on Oct 12, 2022

    gh-96130: Rephrase use of "typecheck" verb for clarity (#98144)

    ed6344e
  9. miss-islington
    added 2 commits that reference this issue on Oct 12, 2022

    pythongh-96130: Rephrase use of "typecheck" verb for clarity (pythonG…

    3b5faf6

    pythongh-96130: Rephrase use of "typecheck" verb for clarity (pythonG…

    816d6b6
  10. JelleZijlstra commented on Oct 12, 2022

    @JelleZijlstra
    JelleZijlstra
    on Oct 12, 2022
    Member
    More actions

    Thanks @ketozhang for the report and @hauntsaninja for the fix!

    Reacted by Keto D. Zhang
  11. JelleZijlstra
    closed this as completedon Oct 12, 2022
  12. miss-islington
    added 2 commits that reference this issue on Oct 12, 2022

    gh-96130: Rephrase use of "typecheck" verb for clarity (GH-98144)

    d22c35d

    gh-96130: Rephrase use of "typecheck" verb for clarity (GH-98144)

    48447d4
  13. carljm
    added 2 commits that reference this issue on Oct 14, 2022

    Merge branch 'main' into typewatch

    6e53514

    Merge branch 'main' into cached_property

    0bb0c69
  14. pablogsal
    added a commit that references this issue on Oct 22, 2022

    gh-96130: Rephrase use of "typecheck" verb for clarity (GH-98144)

    7b1be2a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirDocumentation in the Doc dirtopic-typing

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402503 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.