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


Groups > comp.lang.python > #26325

Re: Linux shell to python

Path csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <dihedral88888@googlemail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.008
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'test,': 0.05; 'mess': 0.09; 'splitting': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'subject:python': 0.11; 'cleanly': 0.16; 'conditional': 0.16; 'readable': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'passes': 0.17; 'tend': 0.17; 'memory': 0.18; 'code.': 0.20; 'cc:2**0': 0.23; 'insert': 0.23; 'cc:no real name:2**0': 0.24; 'specifically': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply-To:1': 0.25; 'header:User-Agent:1': 0.26; 'handling': 0.27; 'dan': 0.29; 'statements': 0.29; "i'm": 0.29; 'becomes': 0.30; 'error': 0.30; 'skip:- 10': 0.32; 'print': 0.32; 'anyone': 0.33; 'received:google.com': 0.34; 'list': 0.35; 'from:addr:googlemail.com': 0.35; 'doing': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'method': 0.36; 'should': 0.36; 'item': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'perform': 0.38; 'object': 0.38; 'some': 0.38; 'think': 0.40; 'skip:u 10': 0.60; 'dead': 0.62; 'jul': 0.65; 'tasks.': 0.65; 'death': 0.71; 'dennis': 0.91
Newsgroups comp.lang.python
Date Tue, 31 Jul 2012 12:01:38 -0700 (PDT)
In-Reply-To <mailman.2761.1343718923.4697.python-list@python.org>
Complaints-To groups-abuse@google.com
Injection-Info glegroupsg2000goo.googlegroups.com; posting-host=123.192.83.145; posting-account=5JdMBQoAAABHnS4mjpqEzxnmWtgiiVNw
References <1343631941.7199.YahooMailNeo@web193104.mail.sg3.yahoo.com> <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>
User-Agent G2/1.0
X-Google-Web-Client true
X-Google-IP 123.192.83.145
MIME-Version 1.0
Subject Re: Linux shell to python
From 88888 Dihedral <dihedral88888@googlemail.com>
To comp.lang.python@googlegroups.com
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Message-ID <mailman.2792.1343761303.4697.python-list@python.org> (permalink)
Lines 82
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1343761303 news.xs4all.nl 6876 [2001:888:2000:d::a6]:53713
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:26325

Show key headers only | 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