On Tue, 07 May 2002 14:57:41 +0100, hans <hans@beehive.de> wrote:
Use the source, Luke !
Youve just proved that is not always good advice ;-)
sorry, just scrutuinized Folder (i recommend richters OrderedFolder, download from iuveno) The items (in ObjectManager) are added with setattr, which is an insert into the ObjManagers object dictionary and relies deeply on the hashing built into python dictionaries. item retrieval = getattr. This essentially makes retrieval order close to unpredictable.
It also maintains _objects, a tuple. It uses this order, not anything derived from __dict__, when computing objectIds etc.
It has been suggested that zope 2.6 should have orderedFolders built in. (i personally would like to have a python ordered_dictionary :-) )
a BTree? Toby Dickenson tdickenson@geminidataloggers.com