[Python-ideas] Re: Simplifying functions syntax

2020-07-21 Thread MRAB
@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

[Python-ideas] Re: Simplifying functions syntax

2020-07-21 Thread Christopher Barker
I'm not sure why I'm bothering to engage, but: On Tue, Jul 21, 2020 at 2:31 AM MRAB 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

[Python-ideas] Re: Simplifying functions syntax

2020-07-21 Thread MRAB
On 2020-07-21 01:25, Thiago Carvalho D'Ávila wrote: Chris Angelico, you have a good point. An alternative solution that would achieve similar or even better results in terms of simplification would be not creating `fun` as a keyword and allowing developers to create functions in Python

[Python-ideas] Re: Simplifying functions syntax

2020-07-21 Thread Chris Angelico
On Tue, Jul 21, 2020 at 10:34 AM Thiago Carvalho D'Ávila wrote: > > Chris Angelico, you have a good point. An alternative solution that would > achieve similar or even better results in terms of simplification would be > not creating `fun` as a keyword and allowing developers to create

[Python-ideas] Re: Simplifying functions syntax

2020-07-20 Thread William Pickard
Actually, Callable is fine the way it is, the chosen name is most fitting and the generic syntax is slightly difference than how it's done in C/C++ (Known difference are due to language differences between Python and C/C++) ___ Python-ideas mailing

[Python-ideas] Re: Simplifying functions syntax

2020-07-20 Thread Guido van Rossum
(The only not unreasonable suggestion in the OP's proposal is to try and come up with something better than Callable --- we've introduced other syntax specifically for type annotations, and are likely to do so again. But **PLEASE** start a new thread for that.) On Mon, Jul 20, 2020 at 7:37 PM

[Python-ideas] Re: Simplifying functions syntax

2020-07-20 Thread Thiago Carvalho D'Ávila
Chris Angelico, you have a good point. An alternative solution that would achieve similar or even better results in 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

[Python-ideas] Re: Simplifying functions syntax

2020-07-20 Thread David Mertz
There is absolutely no possibility that this will go anywhere. It breaks every single Python program written since 1989, with absolutely ZERO new functionally. Changing the spelling of a few of the most come keywords is a non-starter. If you can time travel to 1987 and propose differently spelled

[Python-ideas] Re: Simplifying functions syntax

2020-07-20 Thread Chris Angelico
On Tue, Jul 21, 2020 at 8:10 AM Thiago Carvalho D' Ávila wrote: > In order to make this possible the following changes would be needed: > 1. adding `fun` keyword to method definition (maintaining `def` for backwards > compatibility); > 2. adding `fun` built-in type in addition to Callable; If