@CHB: Can you be a bit more careful with your trimming. You've removed the attribution of the poster. What I wrote was just the reply starting from the "-1" line.

On 2020-07-21 16:37, Christopher Barker wrote:
I'm not sure why I'm bothering to engage, but:

On Tue, Jul 21, 2020 at 2:31 AM MRAB <pyt...@mrabarnett.plus.com <mailto:pyt...@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-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/BP6XJU2PGJNVKOQPJYRRR4UPZTDBOCTL/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to