[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-21 Thread miss-islington
miss-islington added the comment: New changeset ae1732d4611ee859c754e7a867b2a4cbb47d0637 by Miss Islington (bot) in branch '3.10': bpo-44180: Fix edge cases in invalid assigment rules in the parser (GH-26283) https://github.com/python/cpython/commit/ae1732d4611ee859c754e7a867b2a4cbb47d0637

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +24896 pull_request: https://github.com/python/cpython/pull/26292 ___ Python tracker ___

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-21 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +24889 pull_request: https://github.com/python/cpython/pull/26283 ___ Python tracker ___

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-21 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 07dba474c582e61ca455846da7597d4346324e04 by Miss Islington (bot) in branch '3.10': bpo-44180: Report generic syntax errors in the furthest position reached in the first parser pass (GH-26253) (GH-26281)

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-21 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 4.0 -> 5.0 pull_requests: +24887 pull_request: https://github.com/python/cpython/pull/26281 ___ Python tracker

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-19 Thread Andre Roberge
Andre Roberge added the comment: In the second case, I understand very well that it could have been a set literal. In my (limited) experience, I have never seen a set literal containing a single element obtained from an == comparison. Since dict can be built by using keyword arguments, I

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-19 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Hmmm... Then is it possible to add an exception where the error message will result in, SyntaxError: cannot assign to literal here. Maybe you meant ':', "==" or ":=" instead of '='? only if we're dealing with curly braces? --

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-19 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I don't know, it think is more likely that people are triying to use the "=" as a ":" and constructing a literal. Is not a bad error, but I think is not the best one -- ___ Python tracker

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-19 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +24862 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26253 ___ Python tracker

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-19 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: Sorry for the typos. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-19 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: I'm don't the second is a problem at all. What the error message is suggesting is perfect since it doesn't know if we're trying to use a set or dict. -- ___ Python tracker

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-19 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I have an idea of what's causing the first one, but the second I am not sure we can detect easily we are in that case. Do you have a suggestion for what to place in the second case? -- ___ Python tracker

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-19 Thread Shreyan Avigyan
Shreyan Avigyan added the comment: The bad token example needs a fix but the second is actually ok because we have another type we write within curly braces "{" and there the error is actually perfect. Like if we follow the error message, we use ages = {'Alice'==22} And we actually get a

[issue44180] SyntaxError misidentified in 3.10.0b1 when = used instead of : in dict literal

2021-05-19 Thread Andre Roberge
New submission from Andre Roberge : When an equal sign is used instead of a colon in creating a dict literal, depending on the context, either the "bad token" is misidentified OR the would-be helpful error message is incorrect in this particular case. 1) Example of bad token. Previously, the