> 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, Aug 25, 2021, 6:46 PM Finn Mason <[email protected]> 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-13e32ahzqt
> >
> >> 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?
>
> It seems there are already tools for overloading. In terms of type hints,
> there's @typing.overload.
> From what I can tell, overloading the implementation is generally frowned
> upon in Python.
> I'd like to know how your idea is different from PEP 3124. Could you
> please explain?
>
_______________________________________________
Python-ideas mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/3CLGWTLPONUDKT5RGNAWRKKE5POKAIMV/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to