Skip to content

Fix typos in PEP 698 #2830

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

Merged
merged 1 commit into from
Oct 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions pep-0698.rst
Original file line number Diff line number Diff line change
Expand Up @@ -334,16 +334,16 @@ insufficient for several reasons:
Runtime enforcement
-------------------

We considered having ``@typing.overrride`` enforce override safety at runtime,
similarly to how ``@overrides.overrrides``
We considered having ``@typing.override`` enforce override safety at runtime,
similarly to how ``@overrides.overrides``
`does today <https://pypi.org/project/overrides/>`_.

We rejected this for three reasons:

- For users of static type checking, it is not clear this brings any benefits.
- There would be at least some performance overhead, leading to projects
importing slower with runtime enforcement. We estimate the
``@overrides.overrrides`` implementation takes around 100 microseconds, which
``@overrides.overrides`` implementation takes around 100 microseconds, which
is fast but could still add up to a second or more of extra initialization
time in million-plus line codebases, which is exactly where we think
``@typing.override`` will be most useful.
Expand All @@ -359,7 +359,7 @@ We rejected this for three reasons:
Marking overrides at runtime with an ``__override__`` attribute
---------------------------------------------------------------

The ``@overrides.overrrides`` decorator marks methods it decorates with an
The ``@overrides.overrides`` decorator marks methods it decorates with an
``__override__`` attribute.

We considered having ``@typing.override`` do the same, since many typing
Expand Down