Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #26325

Re: Linux shell to python

Newsgroups comp.lang.python
Date 2012-07-31 12:01 -0700
References (1 earlier) <zarafa.5016bc81.4999.5dfe44331e43676a@zarafa-04.c4a.nl> <1826E39D-43C1-4CEB-AEA2-133B95AC0B0B@barrys-emacs.org> <CAGGBd_ojb-O37--BBaa3aZwnxqaPq_FX7mEADOSWxKeSpoNDOQ@mail.gmail.com> <phce18h2219j1i0h7oegmv4cajf09bcv9s@invalid.netcom.com> <mailman.2761.1343718923.4697.python-list@python.org>
Subject Re: Linux shell to python
From 88888 Dihedral <dihedral88888@googlemail.com>
Message-ID <mailman.2792.1343761303.4697.python-list@python.org> (permalink)

Show all headers | View raw


Mark Lawrence於 2012年7月31日星期二UTC+8下午3時15分32秒寫道:
> On 31/07/2012 02:20, Dennis Lee Bieber wrote:
> 
> > On Mon, 30 Jul 2012 22:56:48 +0000, Dan Stromberg <drsalists@gmail.com>
> 
> > declaimed the following in gmane.comp.python.general:
> 
> >
> 
> >
> 
> >> Sigh, and I'm also not keen on multi-line list comprehensions, specifically
> 
> >> because I think they tend to make less readable code.  It also becomes a
> 
> >> mess when you need to insert print statements to get some visibility into
> 
> >> what's going on.
> 
> >
> 
> > 	Cleanly splitting the list-comp by
> 
> >
> 
> > 	[ result-computation
> 
> > 		for-item-selection-clause
> 
> > 		if-filter-clause ]
> 
> >
> 
> > isn't that unreadable... But anyone doing
> 
> >
> 
> > 	[ result-
> 
> > 		-computation for-item-
> 
> > 		-selection-clause if-
> 
> > 		-filter-
> 
> > 		-clause ]
> 
> >
> 
> > should be pecked to death by a dead parrot.
> 
> >
> 
> 
> 
> Any particular species?
> 
> 
> 
> -- 
> 
> Cheers.
> 
> 
> 
> Mark Lawrence.

For each item in the known list that passes the required conditional test,
then  use the item to perform the tasks desired as instructed.

It is not necessary that a new list has to be constructed in the tasks.

A method which can produce a new object always involves some memory management. 
Therefore,  some error handling part should not be missing.

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: Linux shell to python Mark Lawrence <breamoreboy@yahoo.co.uk> - 2012-07-31 08:15 +0100
  Re: Linux shell to python Alister <alister.ware@ntlworld.com> - 2012-07-31 10:53 +0000
  Re: Linux shell to python 88888 Dihedral <dihedral88888@googlemail.com> - 2012-07-31 12:01 -0700
  Re: Linux shell to python 88888 Dihedral <dihedral88888@googlemail.com> - 2012-07-31 12:01 -0700

csiph-web