Type annotations in the stdlib

I think that depends on how you display them. For instance, sphinx.ext.autodoc has multiple options for how to display type information. It would be totally possible to list the type information optionally via a toggle, via a collapsed-by-default drop-down at the end of the callable, etc. That would let those who want the type info to have them easily available while making quick glances and general reading not have them get in the way visually.

“Compilation” of what specifically? If you’re talking about .pyc files then it’s negligible and cached. Plus with PEP 649 now tentatively accepted, that also helps deal with any overhead which typically shows up from importing.

4 Likes