[issue44447] Syntax Error not as detailed as shown

2021-06-24 Thread Eesa Ibrahim Khokhar


Eesa Ibrahim Khokhar  added the comment:

OK, Thanks for letting me know!

On Fri, Jun 18, 2021 at 3:09 PM Pablo Galindo Salgado <
rep...@bugs.python.org> wrote:

>
> Pablo Galindo Salgado  added the comment:
>
> Indeed, as Andre mentions your example is different because in you case
> the call is interpreted as a generator comprehension, not as a function
> call.
>
> --
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> closed
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44447] Syntax Error not as detailed as shown

2021-06-18 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Indeed, as Andre mentions your example is different because in you case the 
call is interpreted as a generator comprehension, not as a function call.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44447] Syntax Error not as detailed as shown

2021-06-18 Thread Jelle Zijlstra


Change by Jelle Zijlstra :


--
components: +Parser -Regular Expressions
nosy: +lys.nikolaou, pablogsal
type: performance -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44447] Syntax Error not as detailed as shown

2021-06-17 Thread Andre Roberge


Andre Roberge  added the comment:

Your example is different than the one in the documentation (What's new).

>>> (x, x for x in range(7))  # Your example
  File "", line 1
(x, x for x in range(7))
  ^^^
SyntaxError: invalid syntax

>>> foo(x, x for x in range(7))  # Example similar to the docs
  File "", line 1
foo(x, x for x in range(7))
   ^^^
SyntaxError: Generator expression must be parenthesized

>>> [x, x for x in range(7)]  # Yet a different example
  File "", line 1
[x, x for x in range(7)]
 
SyntaxError: did you forget parentheses around the comprehension target?

--
nosy: +aroberge

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue44447] Syntax Error not as detailed as shown

2021-06-17 Thread Eesa Ibrahim Khokhar


New submission from Eesa Ibrahim Khokhar :

I was testing the new features for python 3.10 beta 3, and noticed the errors 
were not as detailed as shown in the docs.

I have an image below:


In the docs, it was said that the entire generator statement would be pointed 
out by carets. However, it only pointed out 'for', and the error was not as 
detailed as shown in the docs.

--
components: Regular Expressions
files: Untitled.png
messages: 396023
nosy: ezio.melotti, khokhareesa.home, mrabarnett
priority: normal
severity: normal
status: open
title: Syntax Error not as detailed as shown
type: performance
versions: Python 3.10
Added file: https://bugs.python.org/file50116/Untitled.png

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com