Ethan Furman <et...@stoneleaf.us> writes: > 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'
These seem good to me. One argument given, the same result returned. > --> identity('spam', 'eggs', 7) > ('spam', 'eggs', 7) That's a confusingly inconsistent result, as pointed out by other responses in this thread. I would expect an identity function to accept exactly one positional argument. Given more than one positional argument, it should raise a TypeError. -- \ Legionnaire: “We have their leader captive!” Cæsar: “Is he | `\ bound?” Legionnaire: “Of his health I know not, sir.” —The | _o__) Goon Show, _The Histories Of Pliny The Elder_ | Ben Finney -- https://mail.python.org/mailman/listinfo/python-list