Fredrik Lundh wrote: > but you can easily generate an index when you need it: > > index = dict(d) > > name, type = index["pid"] > print name > > the index should take less than a microsecond to create, and since it > points to the members of the original dict, it doesn't use much memory > either... > Using the same logic, we don't need types other than string in a DBMS as we can always convert a string field into some other types when it is needed.
Of course there are more than one way to skin a cat(well it may be against the general idiom of python) but in some situation certain way is preferred. -- http://mail.python.org/mailman/listinfo/python-list