[Zope] objectIds vs. objectValues vs. objectItems

Andy McKay andym@ActiveState.com
Wed, 25 Jul 2001 09:14:00 -0700


Use the source luke.

http://www.zopezen.org/ZopeZen/Source/lib/python/OFS/%7eObjectManager.py#362

An object manager (folder) maintains a list of the sub objects it has.

objectIds - a list of those objects, fastest

objectValues - returns each object from the list in objectIds, meaning its
slower than objectIds, but more info.

objectItems - returns a set of pairs of id and object, kind of like the
first two rolled into one.

Cheers.
--
  Andy McKay.


----- Original Message -----
From: "Peter Bengtsson" <mail@peterbe.com>
To: <zope@zope.org>
Sent: Wednesday, July 25, 2001 6:17 AM
Subject: [Zope] objectIds vs. objectValues vs. objectItems


> Does anybody with profound knowledge of Zope in details know the
difference
> between:
>
>  - objectIds()
>
>  - objectValues()
>
>  - objectItems()
>
>
> I only know what they do.
> Sometimes I use objectIds() instead of the "richer" objectValues() because
I
> think that only the Ids will be faster to find for the method. Does that
> make sense?
>
> Peter
>
>
>
>
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> 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 )
>