[issue35207] Disallow expressions like (a) = 42

2018-11-12 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> not a bug stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue35207] Disallow expressions like (a) = 42

2018-11-12 Thread Guido van Rossum
Guido van Rossum added the comment: Let's close this already. It won't happen. Sorry for the noise. -- ___ Python tracker ___ ___ P

[issue35207] Disallow expressions like (a) = 42

2018-11-12 Thread Stefan Krah
Stefan Krah added the comment: I just want to add one more voice for allowing the status quo: C, OCaml, SML, Haskell allow the assignment, Ruby disallows it. The ML family must allow it, since "let (x) = 10" is pattern matching under the hood, and (10) = 10. In C (gcc, clang at least, I didn

[issue35207] Disallow expressions like (a) = 42

2018-11-11 Thread Mark Dickinson
Change by Mark Dickinson : -- nosy: +mark.dickinson ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://m

[issue35207] Disallow expressions like (a) = 42

2018-11-10 Thread Guido van Rossum
Guido van Rossum added the comment: Hm, I was thinking of https://github.com/python/cpython/pull/9212/, but that's about keyword arg (where the interpreter incorrectly allowed f((kw)=expr). But on thinking about it more I believe we should allow (a) = (b), so there is no code change required. S

[issue35207] Disallow expressions like (a) = 42

2018-11-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually, `(a) = 42` doesn't contradict the grammar. assignment_stmt ::= (target_list "=")+ (starred_expression | yield_expression) target_list ::= target ("," target)* [","] target ::= identifier | "(" [target_list] ")"

[issue35207] Disallow expressions like (a) = 42

2018-11-09 Thread Guido van Rossum
Guido van Rossum added the comment: I could have sworn Benjamin showed a fix for this during the core-dev sprint in Seattle... -- ___ Python tracker ___ _

[issue35207] Disallow expressions like (a) = 42

2018-11-09 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: I am not sure if this is the cleanest/simplest implementation...if you think there is a better way to do this I am happy to change the Pull Request :) -- ___ Python tracker

[issue35207] Disallow expressions like (a) = 42

2018-11-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- nosy: +gvanrossum, serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue35207] Disallow expressions like (a) = 42

2018-11-09 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- keywords: +patch pull_requests: +9718 stage: -> patch review ___ Python tracker ___ ___ Python

[issue35207] Disallow expressions like (a) = 42

2018-11-09 Thread Pablo Galindo Salgado
New submission from Pablo Galindo Salgado : As commented on Issue33878, the fact that expressions like (x) = 42 are accepted is, in reality, an implementation detail and they should be disallowed. -- assignee: pablogsal components: Interpreter Core messages: 329590 nosy: pablogsal prio