[Dev] Proposing the removal of Item.__iter__( )

John Anderson john at osafoundation.org
Tue Oct 26 08:14:39 PDT 2004


I think this is a fine proposal, however, I'm also not opposed to having
another way to iterate over an ItemCollection -- and in fact the need to
iterate over ItemCollections may end up going away in favor of indexing.

John

Morgen Sagen wrote:

> This is an old outstanding issue I would like to resolve:
>
> One way to get an item's children was to iterate on the item ("for 
> child in item:"), but now that ItemCollection overrides __iter__( ), 
> that changes the behavior.  Iterating on an ItemCollection returns 
> results rather than children.
>
> Unless there are any objections, I would like to have Andi remove 
> Item's __iter__( ) method and just have people use iterChildren( ) 
> instead.
>
> ~morgen
>
> _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
>
> Open Source Applications Foundation "Dev" mailing list
> http://lists.osafoundation.org/mailman/listinfo/dev





More information about the Dev mailing list