You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python 3.10, which is due to be released in October 2021, will have significantly improved error messages for common syntax errors. Here's one of the examples they give:
File "example.py", line 1
expected = {9: 1, 18: 2, 19: 2, 27: 3, 28: 3, 29: 3, 36: 4, 37: 4,
^
SyntaxError: '{' was never closed
Up through Python 3.9, the error points to the subsequent line which can make it harder to understand and find the error. Using Python 3.10 in this lesson would be extremely helpful for the participants to track down errors (especially since unclosed parentheses are really common.
I've been thinking that a note in the setup instructions that gently suggests Python ≥ 3.10 would be worthwhile due to the improved error messages. The note probably shouldn't be included until Python 3.10 has been out for a few months (i.e. ≳ Feb 2022) since it can take some time for packages to be fully supported. I'd also make it clear that 3.10 is not required and that the only noticeable difference will be the significantly improved error messages. The downside of my suggestion is that it'll add some complications to the setup, but the upside is that it'll reduce the frustration associated with debugging common syntax errors.
The text was updated successfully, but these errors were encountered:
I think once Python 3.10 is the default download on the Anaconda site (since that is the version we recommend learners download in the setup), this might be a useful tip to include. Thanks for pointing out this error message change @namurphy !
ldko
added
status:wait
Progress dependent on another issue or conversation
and removed
status:wait
Progress dependent on another issue or conversation
labels
Jun 24, 2021
Python 3.10, which is due to be released in October 2021, will have significantly improved error messages for common syntax errors. Here's one of the examples they give:
Up through Python 3.9, the error points to the subsequent line which can make it harder to understand and find the error. Using Python 3.10 in this lesson would be extremely helpful for the participants to track down errors (especially since unclosed parentheses are really common.
I've been thinking that a note in the setup instructions that gently suggests Python ≥ 3.10 would be worthwhile due to the improved error messages. The note probably shouldn't be included until Python 3.10 has been out for a few months (i.e. ≳ Feb 2022) since it can take some time for packages to be fully supported. I'd also make it clear that 3.10 is not required and that the only noticeable difference will be the significantly improved error messages. The downside of my suggestion is that it'll add some complications to the setup, but the upside is that it'll reduce the frustration associated with debugging common syntax errors.
The text was updated successfully, but these errors were encountered: