Skip to content

PEP 484: NewType is now a class, not a function #2199

Closed

Description

@Fidget-Spinner

Since Python 3.10, we've changed PEP 484's NewType to a class, not a function, so this section is misleading.

Should we update it? Or do we leave it as is?

CC @JelleZijlstra and @gvanrossum

Activity

  1. AlexWaygood commented on Dec 18, 2021

    @AlexWaygood
    Member

    I recently had a PR to the mypy docs accepted, tackling this issue: python/mypy#11621

    I think similar changes to PEP 484 would be good.

  2. JelleZijlstra commented on Dec 18, 2021

    @JelleZijlstra
    Member

    PEPs are historical documents, not living documentation, and at some point we should stop changing them. I guess we previously discussed this in #1942 and #2158.

    For this particular change, I don't think it's especially important that PEP 484 is exactly correct. It's just an implementation detail.

  3. gvanrossum commented on Dec 18, 2021

    @gvanrossum
    Member

    Indeed. PEP 484 is no longer provisional.

  4. CAM-Gerlach commented on Mar 4, 2022

    @CAM-Gerlach
    Member

    Indeed. PEP 484 is no longer provisional.

    @gvanrossum It looks like it is still marked as such—should it be updated?

  5. gvanrossum commented on Mar 4, 2022

    @gvanrossum
    Member

    Yeah, should be Final. :-)

  6. CAM-Gerlach commented on Mar 4, 2022

    @CAM-Gerlach
    Member

    Opened as PR #2380

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

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions