Raymond Hettinger wrote:
[Steven Bethard] I'm just suggesting that in a function with a
*args in the def, the args variable be an iterator instead of
a tuple.
So people would lose the useful abilities to check len(args) or extract
an argument with args[1]?
No more than you lose these abilities wi
[Steven Bethard] I'm just suggesting that in a function with a
> *args in the def, the args variable be an iterator instead of
> a tuple.
So people would lose the useful abilities to check len(args) or extract
an argument with args[1]?
Besides, if a function really wants an iterator, then its si
Raymond Hettinger wrote:
[Steven Bethard]
What I would prefer is something like:
>>> zip(*g(4))
>>> x, y, z = zip(*g(4))
>>> x, y, z
(, at ...)
2. It is instructive to look at Guido's reactions to other *args
proposals. His receptivity to a,b,*c=it wanes whenever someone then
requests support fo
Raymond Hettinger wrote:
[...]
"Not everything that can be done, should be done."
... and not everything that should be done, can be done.
regards
Steve
--
Steve Holden http://www.holdenweb.com/
Python Web Programming http://pydish.holdenweb.com/
Holden Web LLC +1 703 861 4237
Raymond Hettinger <[EMAIL PROTECTED]> wrote:
...
> "Not everything that can be done, should be done."
Or, to quote Scripture...:
"'Everything is permissible for me' -- but not everything is beneficial"
(1 Cor 6:12)...
Alex
--
http://mail.python.org/mailman/listinfo/python-list
[Steven Bethard]
> What I would prefer is something like:
>
> >>> zip(*g(4))
>
> >>> x, y, z = zip(*g(4))
> >>> x, y, z
> (, So I guess my real question is, should I expect Python 3000 to play
> nicely with *args and iterators? Are there reasons (besides
backwards
> incompatibility) that pars
Terry Reedy wrote:
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
I guess the point of my question is to find out if this kind of nice
interaction of *args and iterators is something that's in the road-map.
If it is, then maybe there are parts of it that could be i
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Terry Reedy wrote:
>> I think it worth repeating that Python 3 is at yet something of a
>> pipedream, as indicated by the joke name Python 3000
> Right, though my understanding of PEP 3000[1] is that though "Python
Terry Reedy wrote:
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
So, as I understand it, in Python 3000, zip will basically be replaced
with izip, meaning that instead of returning a list, it will return an
iterator.
I think it worth repeating that Python 3 is at
"Steven Bethard" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> So, as I understand it, in Python 3000, zip will basically be replaced
> with izip, meaning that instead of returning a list, it will return an
> iterator.
I think it worth repeating that Python 3 is at yet somethin
So, as I understand it, in Python 3000, zip will basically be replaced
with izip, meaning that instead of returning a list, it will return an
iterator. This is great for situations like:
zip(*[iter1, iter2, iter3])
where I want to receive tuples of (item1, item2, item3) from the
iterables.
11 matches
Mail list logo