This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author belopolsky
Recipients
Date 2007-03-05.14:21:33
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
1. If this proposal is accepted, it will make sense to deprecate the use of None as an identity function in map:

>>> map(None, range(10))
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

2. Some other languages have an dyadic identity function that returns the *second* argument. 

For example, K has : primitive:

  identity:(:)
  identity[1;2]
2

The rationale in K is that it is useful in an ammed function that replaces entries of an an array with a result of a dyadic function applied to the old and the supplied value and it is natural to have old value first:

  @[1 2 3;1;-;20]
1 -18 3
  @[1 2 3;1;:;20]
1 20 3

This rationale does not apply to Python, but in the absence of other reasons to choose the order of arguments, Python may as well follow the precedent. Does anyone know a less exotic language that has a dyadic identity?


History
Date User Action Args
2007-08-23 16:12:36adminlinkissue1673203 messages
2007-08-23 16:12:36admincreate