[Python-ideas] Re: Add explicit method overloading to STL

2021-08-25 Thread Serhiy Storchaka
24.08.21 05:10, Will Bradley пише: > Don't know if this is already a PEP, but I'd love to see something > like this > >  in > Python— a decorator @overload that creates multiple copies of > functions/methods based on

[Python-ideas] Re: Add explicit method overloading to STL

2021-08-25 Thread Kale Kundert
> I'd like to know how your idea is different from PEP 3124. Could you please explain? TBH I hadn't heard of PEP 3124 until this thread, so hopefully I'm not getting something wrong.  But my understanding is that the `@overload` decorator from PEP 3124 (i) requires all of the functions it decorate

[Python-ideas] Re: Add explicit method overloading to STL

2021-08-25 Thread Finn Mason
> You may also be interested in a package I wrote for doing this kind of thing: > https://pypi.org/project/signature-dispatch/ After reading about this project, I'm interested in the idea of callable modules in Python. However, that's another issue for another day and another person. On Wed, Au

[Python-ideas] Re: Add explicit method overloading to STL

2021-08-25 Thread Finn Mason
>> 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-13e32ahzqt > >> in >> Python— a decorator @overload that creates multiple copies of >> functions/methods based on their arguments' types. (This i

[Python-ideas] Re: Add explicit method overloading to STL

2021-08-25 Thread Kale Kundert
On 8/23/21 10:21 PM, Steven D'Aprano wrote: > 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 >> >> in >> Python— a decora

[Python-ideas] Re: Add explicit method overloading to STL

2021-08-23 Thread Steven D'Aprano
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 > > in > Python— a decorator @overload that creates multiple copies of > fun