devguide icon indicating copy to clipboard operation
devguide copied to clipboard

Clarify usage of type hints in the standard-library modules

Open Privat33r-dev opened this issue 1 year ago • 0 comments

I think that Alex summarized the issue pretty well:

In general our policy is currently not to add type hints to standard-library modules in the Lib/ directory (there are some exceptions, but they're all pretty specific). I think we still have yet to add some formal documentation around this in the devguide (we really need to!), but you can see some rationales here:

  • https://github.com/python/cpython/pull/108125#discussion_r1313654070
  • https://discuss.python.org/t/type-annotations-in-the-stdlib/21487

Originally posted by @AlexWaygood in https://github.com/python/cpython/pull/117583#discussion_r1556105954

Privat33r-dev avatar Apr 08 '24 16:04 Privat33r-dev