> Why does _ need to be special cased like this? In Python this works with any variable name.
To, in general, make giving multiple arguments for a function or block/lambda the same name a syntax error.
Python special-cases generators, but having multiple identical argument names for a function in Python is a syntax error.
Ruby is a bit more 'regular' in that in both blocks/lambdas and functions, reusing an argument name is always an error. '_' then functions not as a name but a special 'disregard' symbol.
To, in general, make giving multiple arguments for a function or block/lambda the same name a syntax error.
Python special-cases generators, but having multiple identical argument names for a function in Python is a syntax error.
Ruby is a bit more 'regular' in that in both blocks/lambdas and functions, reusing an argument name is always an error. '_' then functions not as a name but a special 'disregard' symbol.