Petri Savolainen wrote: > Am I right in assuming that calls to objectValues etc. still return a > real sequence of objects loaded in memory from ZODB? How about making > object* calls return a generator instead? Has this been discussed > somewhere already? I tried a bit of googling & list-searching but could > not find much anything on this.
Funny you should ask, I played with something similar the other day. I wanted superValues-like functionality for CMF portal_types. Take a look at <http://svn.plone.org/view/collective/PloneboardPluggableDiscussion/trunk/utils.py?rev=10024&view=markup> for some rather inelegant looking code the implements this as an iterator. It's a bit different from what you're after as the gain isn't in the contentValues call (which is the equivalent of your objectValues), but rather in the fact that only the smallest number of those calls that are needed is made. Tim _______________________________________________ Zope-Dev maillist - Zope-Dev@zope.org http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )