mirror of
https://github.com/python/cpython.git
synced 2026-05-06 20:51:17 -04:00
cb339d3c9e
Ensure function annotations are returned in order of definition Previously, when getting type annotations of a function, normal arguments were returned before positional-only ones in the dictionary. Since `functools.singledispatch` relies on this ordering being correct to dispatch based on the type of the first argument, this issue was causing incorrect registrations for functions with positional-only arguments. This commit updates how annotations are generated so that positional-only arguments are generated and added to the dictionary before normal arguments.
Miscellaneous source files for the main Python shared library