Jack Diederich wrote:
On Thu, Sep 01, 2005 at 07:58:40PM +0200, Paolino wrote:
Working on a tree library I've found myself writing
itertools.chain(*[child.method() for child in self]).
Well this happened after I tried instinctively
itertools.chain(child.method() for child in self).
Is there
[Paolino]
Well this happened after I tried instinctively
itertools.chain(child.method() for child in self).
As Jack's note points out, your proposed signature is incompatible with
the one we have now. I recommend creating your own version:
def paolino_chain(iterables):
for it in
Christos Georgiou wrote:
Paolino [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
What if I want to chain an infinite list of iterables?
Shouldn't itertools.chain be built to handle that?
Raymond already suggested a four-line function that does exactly that.
Create your
Working on a tree library I've found myself writing
itertools.chain(*[child.method() for child in self]).
Well this happened after I tried instinctively
itertools.chain(child.method() for child in self).
Is there a reason for this signature ?
Regards paolino
On Thu, Sep 01, 2005 at 07:58:40PM +0200, Paolino wrote:
Working on a tree library I've found myself writing
itertools.chain(*[child.method() for child in self]).
Well this happened after I tried instinctively
itertools.chain(child.method() for child in self).
Is there a reason for this