3 ms·
> I get that you're being purposefully obtuse or whatever Fuck off. :) > but in just about every sane language (not to mention plain-old mathematics), extrane
by minitech 5y ago
> I get that you're being purposefully obtuse or whatever
Fuck off. :)
> but in just about every sane language (not to mention plain-old mathematics), extraneous parentheses don't behave like this
Sure they do. They imply their contents is a value (which a splat emphatically should not be), rather than part of the syntax of an argument list, pattern, or literal. Now, the existence of splat syntax implies a dynamic language, which means it’s never going to be fully sane, but I can say I’m extremely surprised to find that `f(a, (*b))` works in Python. It doesn’t in Ruby. `f((kwarg=value))` doesn’t work in Python.
> Try to put yourself in a neophyte's shoes, this would confuse the hell out of you.
The error message, maybe. Like I said, I never ran into it. The behaviour of the syntax, no.