<br><br><div class="gmail_quote">On 4 July 2011 22:46, Devin Jeanpierre <span dir="ltr"><<a href="mailto:jeanpierreda@gmail.com">jeanpierreda@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Mon, Jul 4, 2011 at 5:08 PM, Antoine Pitrou <<a href="mailto:solipsis@pitrou.net">solipsis@pitrou.net</a>> wrote:<br>
>> Arbitrary iterables, arbitrarily nested...<br>
>> beware of objects which are also their first element, like str('a')...<br>
><br>
> Ouch. I guess that shoots the proposal dead in the water, then.<br>
<br>
</div>Wasn't the suggestion only for flat iterables, like {int, float,<br>
complex}, rather than nested iterables?<br>
<br>
I'm ambivalent, as long as the implementation is careful to make sure<br>
one can still use isinstance on classes like these:<br>
<br>
    class WeirdMetaclass(type):<br>
        def __iter__(self):<br>
            yield 1<br>
<br>
    class MyObject(metaclass=WeirdMetaclass):<br>
        pass<br>
<br>
It still feels a little dirty though, to have to pick between options<br>
that are not mutually exclusive.<br></blockquote><div><br></div><div>That's a more reasonable objection for not accepting arbitrary iterables (although iterable types are a little "specialised"). </div><div>
<br></div><div>Michael</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<font color="#888888"><br>
Devin<br>
</font><div><div></div><div class="h5">_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org">Python-ideas@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-ideas" target="_blank">http://mail.python.org/mailman/listinfo/python-ideas</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><pre cols="72"><a href="http://www.voidspace.org.uk/" target="_blank">http://www.voidspace.org.uk/</a><br><br>May you do good and not evil<br>May you find forgiveness for yourself and forgive others<br>
May you share freely, never taking more than you give.<br>-- the sqlite blessing <a href="http://www.sqlite.org/different.html" target="_blank">http://www.sqlite.org/different.html</a></pre>
<br>