This commit is contained in:
Christian Heimes 2013-10-07 15:20:46 +02:00
commit d52a386e82
1 changed files with 28 additions and 0 deletions

View File

@ -228,6 +228,34 @@ Several modules in the standard library use identity lookups for object
memoization, for example ``pickle``, ``json``, ``copy``, ``cProfile``,
``doctest`` and ``_threading_local``.
Other languages
---------------
C# / .Net
^^^^^^^^^
.Net has a generic ``Dictionary`` class where you can specify a custom
``IEqualityComparer``: http://msdn.microsoft.com/en-us/library/xfhwa508.aspx
Using it is the recommended way to write case-insensitive dictionaries:
http://stackoverflow.com/questions/13230414/case-insensitive-access-for-generic-dictionary
Java
^^^^
Java has a specialized ``CaseInsensitiveMap``:
http://commons.apache.org/proper/commons-collections/apidocs/org/apache/commons/collections4/map/CaseInsensitiveMap.html
It also has a separate ``IdentityHashMap``:
http://docs.oracle.com/javase/6/docs/api/java/util/IdentityHashMap.html
C++
^^^
The C++ Standard Template Library features an ``unordered_map``
with customizable hash and equality functions:
http://www.cplusplus.com/reference/unordered_map/unordered_map/
Copyright
=========