On 12/07/2017 12:24 PM, Peter Otten wrote:
identity((a, b, c))
calls identity() with one argument whereas
identity(a, b, c)
calls identity() with three arguments. That's certainly an effect; you just
undo it with your test for len(args) == 1. That means that your identity()
function throws away the information about the number of arguments it was
called with. I would expect an identity() function to be lossless
("bijective") and I think that is possible only if you restrict it to a
single argument.
Thanks for exposing/clarifying that flaw. I have removed my answer.
--
~Ethan~
--
https://mail.python.org/mailman/listinfo/python-list