I'm not sure why I'm bothering to engage, but:

On Tue, Jul 21, 2020 at 2:31 AM MRAB <python@mrabarnett.plus.com> wrote:
terms of simplification would be not creating `fun` as a keyword and allowing developers to create functions in Python without a keyword (like in C-family). That way, a new proposal would be changing:
>>>> x(method: fun[int, dict] -> None) -> None:

one trick is that x(some, stuff) is currently a valid expression.

One real difference between C and Python is that C has "declarations", and not just of functions. Python does not, hence the keyword.

As you pointed out in your initial post -- many languages use a keyword to declare a function -- I can't see the gain from getting rid of that -- even if it were a new language, and we didn't have backward compatibility to worry about.

I haven't written a whole lot of C, but I always found the function declaration syntax kind of confusing.

-CHB







 
> ... pass
> ...
>>>> type(x)
> <class 'fun'>
>
> What do you think?
>
-1

It's clearer if you say upfront that you're defining a function, which
is that 'def' does.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-leave@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/HGJ6VR5SZYE56ZZ7OJNP6QVJUFBVJYBC/
Code of Conduct: http://python.org/psf/codeofconduct/


--
Christopher Barker, PhD

Python Language Consulting
  - Teaching
  - Scientific Software Development
  - Desktop GUI and Web Development
  - wxPython, numpy, scipy, Cython