[pypy-dev] std objectspace interface

Armin Rigo arigo at tunes.org
Fri Apr 7 18:43:27 CEST 2006


Hi Stephan,

On Fri, Apr 07, 2006 at 06:16:39PM +0200, Stephan Diehl wrote:
> space.newseqiter.

This is only for iterating over sequences, just like W_SeqIterObject.

> Or is the dictobject way the preferred one? There we have special iterator 
> object 'W_DictIter_Keys', for example.

Yes, you need a special iterator class like W_DictIter_Keys.

BTW, W_SetObject.data, which is an r_dict, should ideally have 'None' as
keys instead of space.w_True.  This would make the low-level translated
code more memory-efficient, by using 'void' values instead of pointers
to space.w_True.


A bientot,

Armin.



More information about the Pypy-dev mailing list