[MERGE] fix for a keyerror in finding least common ancestors
Aaron Bentley
aaron.bentley at utoronto.ca
Tue Aug 7 19:22:49 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
John Arbash Meinel wrote:
> John Arbash Meinel has voted tweak.
> Status is now: Conditionally approved
> Comment:
> What if instead of just assuming 'c' before 'd', we do something like
> 'b', 'c', 'd'. So we have the option of coming before or after.
>
> I believe the sort order is based on 'hash(key)'.
The doc sayeth:
Keys and values are listed in an arbitrary order which is non-random,
varies across Python implementations, and depends on the dictionary's
history of insertions and deletions.
It's actually possible that some dict implementations would sort 'b'
after both 'c' and 'd', if it was inserted last.
> I'm not sure how to test it, but if you could have 3 keys, one will be
> in the middle, but I don't know if you can have all of them deleted at
> the same time.
I'll add 'a' and 'b' and shift everything down one letter. Even if we
can't completely control iteration order, we can try to test the
reasonable implementations.
Aaron
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGuLh50F+nu1YWqI0RAuyKAJ9fXkdHyDuVvypcGgGPW67/hMOgBACfRybR
np/d1OB50+eVUEj0t9gZRI4=
=nczc
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list