On Fri, 15 Oct 2021 at 18:07, Sebastian M. Ernst <[email protected]> wrote:

> Ignoring typeguard, my suggestion still stands, although slightly
> changed: Annotating a dictionary as described earlier in such a way that
> type inference is not required OR in such a way that run-time checkers
> have a chance to work more easily - if this makes any sense at all?

I'm not sure what your suggestion actually is, though.

"I am looking for an arbitrary number of typed keys/value pairs." -
isn't that Mapping[str, float]" (or something similar)?

I see no value in making the programmer do more work so that type
checkers can do less type inference. Far from it, I'd like to have as
few annotations as possible, and have the type checkers do *more* work
for me. Ideally, I feel that I should only have to annotate the bare
minimum, and let the checker do the rest.

Paul
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/LWYFV4QTCFFSE7C6JBIBREUXKAUB35FJ/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to