[issue45982] Bug in Error messages

2021-12-04 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
Removed message: https://bugs.python.org/msg407685

___
Python tracker 

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



[issue45982] Bug in Error messages

2021-12-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

It doesn't happen anymore with the latest 3.10:

>>> if datetime.now()strftime(...) != "19:50:00": pass
  File "", line 1
if datetime.now()strftime(...) != "19:50:00": pass
 
SyntaxError: invalid syntax

--

___
Python tracker 

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



[issue45982] Bug in Error messages

2021-12-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

It doesn't happen anymore with the latest 3.10:

>>> if datetime.now(),strftime(...) != "19:50:00": pass
  File "", line 1
if datetime.now(),strftime(...) != "19:50:00": pass
 ^
SyntaxError: invalid syntax

--

___
Python tracker 

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



[issue45982] Bug in Error messages

2021-12-04 Thread Matt Wozniski


Matt Wozniski  added the comment:

> Syntactically, this could be many possible errors: missing comma, missing 
> period, missing parens, missing brackets, etc.

Syntactically, it cannot be a missing comma. Adding the comma is a syntax error.

$ python3 -c 'if datetime.now(),strftime(...) != "19:50:00": pass'
  File "", line 1
if datetime.now(),strftime(...) != "19:50:00": pass
 ^
SyntaxError: invalid syntax

Granted this is a heuristic, but it would be nice if it was able to not suggest 
a change that it would reject as syntactically incorrect.

--
nosy: +godlygeek

___
Python tracker 

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



[issue45982] Bug in Error messages

2021-12-04 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

I concur with Eric: the purpose of the error message is a suggestion based in 
the most likely cause. Also  we have recently refined this so I will trigger in 
less uncommon situations.

--
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



[issue45982] Bug in Error messages

2021-12-04 Thread Eric V. Smith


Eric V. Smith  added the comment:

Syntactically, this could be many possible errors: missing comma, missing 
period, missing parens, missing brackets, etc.

A human can figure it out based on semantics, but based purely on syntax, I 
think this error message is good enough.

--
components: +Parser -Interpreter Core
nosy: +eric.smith, lys.nikolaou, pablogsal

___
Python tracker 

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



[issue45982] Bug in Error messages

2021-12-04 Thread Dong-hee Na


Change by Dong-hee Na :


--
nosy: +corona10

___
Python tracker 

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



[issue45982] Bug in Error messages

2021-12-04 Thread UnknownLITE


New submission from UnknownLITE :

A dot is missing between `now()` and `strftime` but it is suggesting that most 
probably a comma is missing.

--
components: Interpreter Core
files: Screenshot 2021-12-04 202054.png
messages: 407670
nosy: UnknownLITE
priority: normal
severity: normal
status: open
title: Bug in Error messages
type: enhancement
versions: Python 3.10
Added file: https://bugs.python.org/file50475/Screenshot 2021-12-04 202054.png

___
Python tracker 

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