[Python-ideas] Re: Revise using the colon ( : )

2023-09-11 Thread Celelibi
2023-09-05 18:26 UTC+02:00, Dom Grigonis : > I like the idea of eliminating it if it was possible. This is one of my most > common syntax errors (although mostly after function signature) and I am not > C/C++ programmer. I am not sure about the core technical issues, but > readability of code, such

[Python-ideas] Re: Have del return a value

2023-09-11 Thread Rob Cliffe via Python-ideas
On 08/09/2023 22:19, Christopher Barker wrote: On Fri, Sep 8, 2023 at 11:00 AM Barry Scott wrote: I see no need for del to return anything, you already have the reference in foo. The times that foo is dropped at module level are rare enough to not need special syntax. I agr

[Python-ideas] Re: Revise using the colon ( : )

2023-09-11 Thread Stephen J. Turnbull
Celelibi writes: > I just want to mention that without colons, one-liners could become > ambiguous: I have no sympathy for optional colons. No colons, no one-liners. (Of course optional colons are a great strategy for trying it out, but in your test programs you should maintain no-colon discip

[Python-ideas] Re: Revise using the colon ( : )

2023-09-11 Thread Dom Grigonis
I don’t think your example depicts the ambiguity well. 1. is the correct parsing of the Original1, 2. is the correct parsing of Original2 and 3. is not correct for either of those. Original1 > while a < b (x := c) - 42 Original2 > while a < b(x := c) - 42 1. In this case, it’s obviously this on

[Python-ideas] Re: Have del return a value

2023-09-11 Thread Rob Cliffe via Python-ideas
On 08/09/2023 22:19, Christopher Barker wrote: On Fri, Sep 8, 2023 at 11:00 AM Barry Scott wrote: I see no need for del to return anything, you already have the reference in foo. The times that foo is dropped at module level are rare enough to not need special syntax. I agr