Quoth Mike Meyer <[EMAIL PROTECTED]>:
| Donn Cave <[EMAIL PROTECTED]> writes:
...
|> For me, conceptually, if an object can't be accessed
|> sequentially, then it can't be mapped to a sequence.
|
| So you're saying that for should implicitly invoke list (or maybe
| iter) on any object that it's passed that's not a list or iterator?

Not really saying anything so concrete about it -- doesn't make
any difference to me how it works, just saying that all these
things come together.  Convert to list, iterate, for.  They're
conceptually not just related, but bound together.

|> Anyway, it seems to me that in the end this is about
|> that balance between practicality and purity.  Maybe
|> it's more like tuples have a primary intended purpose,
|> and some support for other applications.  Not white,
|> but not pure black either.
|
| If you do that, you've just weakened the case for not having count
| etc. as methods of tuples.
|
| It really is the dichotomy of "tuples aren't meant to be sequences so
| they don't have ..." versus being able to access them sequentially
| that gets me. That just doesn't seem right.

The case is weakened only if we have been pretending it was really
strong.  I guess this may be why this issue drives certain people
crazy.  There's a case for "don't have", but it isn't air-tight, so
what do we do?  Well, that's the one thing I really like about the
winter holiday season -- some particularly flavorful ales come out
of the local micro-breweries around this time of year, just in time
to ease my worries about tuples.

        Donn Cave, [EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to