dictionnaries and lookup tables

m.barenco at gmail.com m.barenco at gmail.com
Tue Oct 11 14:50:24 EDT 2005


>Sure they're implemented.

Oops, my apologies.

Just to build up on that, when I run:

#start of listing
import random

A={1:None,2:None,"hello":None,(1,2,3):None}

def dictcomp(n):
	for i in range(n):
		B=A.copy()
		C=A.copy()
		b=random.uniform(0,1)
		c=random.uniform(0,1)
		B[b]=None
		C[c]=None
		res=((B>C)==(b>c))
		print res,

dictcomp(1000)
#end of listing

I get 1000 True's on the output, which suggests that key-wise ordering
is implemented in some guise. The question is: how do I access that?

Thanks

Martino




More information about the Python-list mailing list