Petri Savolainen wrote at 2005-8-4 19:01 +0300: >Am I right in assuming that calls to objectValues etc. still return a >real sequence of objects loaded in memory from ZODB?
It depends. It is true for the standard folder, but it has anyway already loaded its complete content; therefore, the highest cost has already been paid whether or not you return a generator or not. Because of this behaviour, you should use such a folder only for moderately many items "BTreeFolder2" on the other hand already returns a generator -- although not a standard Python generator but a so call "LazyMap". >How about making >object* calls return a generator instead? I am against replacing "object*" return values by true Python generators because the do not support indexing (which I use occasionally). The change would be backward incompatible, the gain probably not worth this... -- Dieter _______________________________________________ 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 )