On Tue, Mar 2, 2021 at 2:25 PM David Foster <davidfstr@gmail.com> wrote:
> As was discussed in another thread, could we deprecate __total__,
> ideally through this PEP?

I must have missed the other thread.

By deprecate do you mean put through some kind of formal deprecation
process such that accessing the attribute triggers warnings and later
the attribute is removed outright? I am unfamiliar with how Python
features are usually deprecated.

Sounds about right. I think it takes two full release cycles.
I could potentially see deprecating `__total__` in this PEP. That flag
is definitely misleading when there are keys of mixed totality, either
via keys of mixed totality in a single TypedDict type, or through an
inheritance chain of mixed totality.

It tells us the default totality of the current class. That would still be useful for code that introspects `__annotations__` and wants to interpret any `Required` or `NotRequired` items it finds.

I think it's fine to keep it, at least as long as we're not removing `total=` from the class declaration.

--Guido van Rossum (python.org/~guido)