>>> id("blub")
-1210548288
This is not identity in a mathematical view.
def identity(x): return x
It has is uses. I had some kind of parser and had a dict like this:
{case: function, ...} It had to be a dict, because i wanted to
dynamically add and remove cases. In some cases nothing had to be done.
To represent this in the dict a identity function is needed. There
surely are other ways, but identity was the most expressive in my eyes.
Nice read, by the way. Thanks for sharing ;)
--
http://mail.python.org/mailman/listinfo/python-list