Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Feature or enhancement
Right now the syntax error is not very clear:
I propose to instead use something like:
@JelleZijlstra suggested to use similar error messages to:= case, where we also only expect a name:
>>> (a.b :=3)File"<unknown>",line1 (a.b :=3)^^^SyntaxError:cannotuseassignmentexpressionswithattribute>>> (a[0] :=3)File"<unknown>",line1 (a[0] :=3)^^^^SyntaxError:cannotuseassignmentexpressionswithsubscript>>> ((a,b) :=3)File"<unknown>",line1 ((a,b) :=3)^^^^^^SyntaxError:cannotuseassignmentexpressionswithtuple
I am working on this right now :)