Fixing tests
Fixing tests
Posted Apr 12, 2012 19:57 UTC (Thu) by dskoll (subscriber, #1630)In reply to: Fixing tests by man_ls
Parent article: Python 2.6.8, 2.7.3, 3.1.5, and 3.2.3 security release
I believe it's an implementation artifact. I don't think JavaScript hashes guarantee any kind of order.
PHP (yuck) arrays do seem to guarantee an order. PHP is completely broken and confusingly combines hashes and arrays into the same data structure. Internally, it keeps extra pointers around so you can pull out elements in the same order you put them in. So a PHP hash bucket costs at least two pointers worth of space more than it should, not to mention the constant time overhead of maintaining the two extra pointers.
