Great, so what does this mean then? def add(int a: float, float b: int): return a + b
On Sun, Apr 25, 2021 at 2:19 PM Shreyan Avigyan <pythonshreya...@gmail.com> wrote: > I am aware of all those libraries that allows us to type check. But it > would be nice to have this feature built-in. I'm not talking about > modifying type annotation but introducing a new feature. Like, > > def add(int a, int b): > return a + b > > If type is not provided then take in any parameter types. Like, > > def example(c): > print(c) > _______________________________________________ > Python-ideas mailing list -- python-ideas@python.org > To unsubscribe send an email to python-ideas-le...@python.org > https://mail.python.org/mailman3/lists/python-ideas.python.org/ > Message archived at > https://mail.python.org/archives/list/python-ideas@python.org/message/BSE7RQ5EL2EFLYY6LTZRY5FARKN2XZW4/ > Code of Conduct: http://python.org/psf/codeofconduct/ > > -- CALVIN SPEALMAN SENIOR QUALITY ENGINEER calvin.speal...@redhat.com M: +1.336.210.5107 [image: https://red.ht/sig] <https://red.ht/sig> TRIED. TESTED. TRUSTED. <https://redhat.com/trusted>
_______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/CIS3PB34YTW3Q6EZ4R5XHJPTTL3IFYJV/ Code of Conduct: http://python.org/psf/codeofconduct/