On Sun, 27 May 2007, Ryan Freckleton wrote:
> I've been following the python-dev and python 3000 lists for over a
> year, but this is my first posting.

Hello!

> I think I've found additional abstract base class to add to PEP 3119.
> An ABC for composable data (e.g. list, tuple, set, and perhaps dict)
> to inherit from. An composable object can contain instances of other
> composable objects. In other words, a composable object can be used as
> the outer container in a nested data structure.
[...]
> def recurse(sequence):
>       if isinstance(sequence, Composoble):
>               for child in sequence:
>                       recurse(child)
>       else:
>               print sequence

I think I understand your example, but I don't understand what makes
it necessary to introduce an ABC for Composable as separate from
Iterable.  What is intended to be different about Composable?  Can
you provide a usage example for Composable where Iterable would not
be sufficient?


-- ?!ng
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to