Why are there no ordered dictionaries?
fredrik at pythonware.com
Tue Nov 22 10:14:41 CET 2005
Alex Martelli wrote:
> What about PHP? Thanks!
according to some random PHP documentation I found on the intarweb:
An array in PHP is actually an ordered map. A map is a type that
maps values to keys.
A key may be either an integer or a string. If a key is the standard
representation of an integer, it will be interpreted as such (i.e. "8"
will be interpreted as 8, while "08" will be interpreted as "08"). Floats
in key are truncated to integer.
You cannot use arrays or objects as keys. Doing so will result in a
warning: Illegal offset type.
at which point my brain raised an exception.
More information about the Python-list