On 7 December 2017 at 20:35, Chris Angelico <ros...@gmail.com> wrote: > Because it's impossible to return multiple values. IMO the "identity > function" is defined only in terms of one single argument, so all of > this is meaningless.
Indeed, this is the key point. The Python language only allows returning one value (which can be a tuple, sure, but it's still *one value*). So a function that returns what it's called with can only have one argument. Anything else isn't an "identity function". Certainly, it might be useful - "def f(arg, *rest, **kw): return arg" could be a useful dummy function in some contexts, for example - but it's not an identity function in the strict sense (and so you can't avoid having to specify its behaviour explicitly). Paul -- https://mail.python.org/mailman/listinfo/python-list