> On Nov. 8, 2013, 6:50 p.m., Ben Mahler wrote:
> > src/cli/mesos-tail, line 186
> > <https://reviews.apache.org/r/15336/diff/2/?file=380754#file380754line186>
> >
> >     I think we can eliminate the need for two loops here using 
> > itertools.chain:
> >     
> >     http://docs.python.org/2.6/library/itertools.html#itertools.chain
> >     
> >     E.g.:
> >     
> >     for framework in itertools.chain(master_state['frameworks'], 
> > master_state['completed_frameworks']):
> >     
> >     Likewise we could chain below:
> >     
> >     for task in itertools.chain(framework['tasks'], 
> > framework['completed_tasks'])
> >     
> >     What do you think?

So Nice!! Thank you for letting me know about it :-)
itertools works perfectly for this.
I will update diff shortly.


- Shingo


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15336/#review28560
-----------------------------------------------------------


On Nov. 8, 2013, 4:14 a.m., Shingo Omura wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15336/
> -----------------------------------------------------------
> 
> (Updated Nov. 8, 2013, 4:14 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, Du Li, and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See Summary.
> 
> 
> Diffs
> -----
> 
>   src/cli/mesos-tail f4f7c75 
> 
> Diff: https://reviews.apache.org/r/15336/diff/
> 
> 
> Testing
> -------
> 
> mesos tail --master=... --framework=... --task=... --file=...
> 
> 
> Thanks,
> 
> Shingo Omura
> 
>

Reply via email to