8000 bpo-46998: Allow subclassing Any at runtime by hauntsaninja · Pull Request #31841 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-46998: Allow subclassing Any at runtime #31841

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 15 commits into from
Apr 5, 2022
Prev Previous commit
Next Next commit
add a sentence on reasoning
  • Loading branch information
hauntsaninja committed Mar 30, 2022
commit 63b00e41cb466191874763af431ce9e500eeecbc
4 changes: 3 additions & 1 deletion Doc/library/typing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,9 @@ These can be used as types in annotations and do not support ``[]``.
* :data:`Any` is compatible with every type.

.. versionchanged:: 3.11
:data:`Any` can now be used as a base class
:data:`Any` can now be used as a base class. This can be useful for
avoiding type checker errors in classes that can duck type anywhere or
are highly dynamic.

.. data:: Never

Expand Down
0