[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Zope] Default sort order for objects in objectManagers ??


On Tue, 07 May 2002 14:57:41 +0100, hans <hans@xxxxxxxxxx> 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@xxxxxxxxxxxxxxxxxxxxx


_______________________________________________
Zope maillist  -  Zope@xxxxxxxx
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists -
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )



This mailing list archive is a service of Copilotco.