+ 3

Some people on the internet seemed to have some trouble understanding this.

So, basically I was on stack overflow and noticed a question, that raised my interest. https://code.sololearn.com/cv08QZZV6a15/?ref=app

20th Oct 2017, 4:42 PM
eRosz
eRosz - avatar
3 Respostas
+ 4
"Keyword can't be an expression" Python's complaining that you're using an assignment expression where a keyword should be, when what it should say (?) is that you can't have numeric keywords (parameter names). I read somewhere the Python devs were unhappy with error messages that are *technically* correct but contextually confusing (this is one of those)... and they wanted help fixing it. ...it's how I'm reading this at least. Nice example.
20th Oct 2017, 5:25 PM
Kirk Schafer
Kirk Schafer - avatar
+ 4
Yeah, in my opinion the error message it throws doesn't really specify the issue enough, and throws some people more off than on. On some languages I have seen that assigning to an integer with hashtypes actually work, which might be the cause of this misconception.
20th Oct 2017, 5:29 PM
eRosz
eRosz - avatar
0
Real talk, think about it 💦
25th Oct 2017, 10:22 PM
Pavel Chupurov
Pavel Chupurov - avatar