[Dev] Proposing the removal of Item.__iter__( )
Morgen Sagen
morgen at osafoundation.org
Mon Oct 25 13:09:28 PDT 2004
A clarification: classes like ItemCollection would still be free to
implement __iter__; I'm just proposing doing away with the generic
Item.__iter__.
On Oct 25, 2004, at 12:51 PM, 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.
More information about the Dev
mailing list