On Fri, Dec 8, 2017 at 5:53 AM, Peter Otten <__pete...@web.de> wrote: > Ethan Furman wrote: > >> The simple answer is No, and all the answers agree on that point. >> >> It does beg the question of what an identity function is, though. >> >> My contention is that an identity function is a do-nothing function that >> simply returns what it was given: >> >> --> identity(1) >> 1 >> >> --> identity('spam') >> 'spam' >> >> --> identity('spam', 'eggs', 7) >> ('spam', 'eggs', 7) > > Hm, what does -- and what should -- > > identity(('spam', 'eggs', 7)) > > produce?
The same thing. And so should identity((('spam', 'eggs', 7))) and identity(((('spam', 'eggs', 7)))) and identity((((('spam', 'eggs', 7))))). For consistency, identity 'spam', 'eggs', 7 should work too. ChrisA -- https://mail.python.org/mailman/listinfo/python-list