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

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


hans wrote:

Max M wrote:

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.


Yes if if the object dictionary is indeed an ordinary dict. But I have a sneaking suspicion that it is a Btree of sorts, and so the rules can be different.

And the behaviour suggets that it is so.

Try and create some objects in a folder and then view the objectIds(). They are allways ordered in the order they are created.

regards Max M



_______________________________________________
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.