24 Aug
2021
24 Aug
'21
2:21 a.m.
On Mon, Aug 23, 2021 at 09:10:49PM -0500, Will Bradley wrote:
Don't know if this is already a PEP, but I'd love to see something like this https://www.codementor.io/@arpitbhayani/overload-functions-in-python-13e32ah... in Python— a decorator @overload that creates multiple copies of functions/methods based on their arguments' types. (This is much narrower in scope than PEP 3124, before anyone asks.)
Do you mean something like functools.singledispatch? https://docs.python.org/3/library/functools.html#functools.singledispatch If not, how are they different? -- Steve