Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Re: Linux shell to python

Reply
Thread Tools

Re: Linux shell to python

 
 
Mark Lawrence
Guest
Posts: n/a
 
      07-31-2012
On 31/07/2012 02:20, Dennis Lee Bieber wrote:
> On Mon, 30 Jul 2012 22:56:48 +0000, Dan Stromberg <(E-Mail Removed)>
> 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.

 
Reply With Quote
 
 
 
 
88888 Dihedral
Guest
Posts: n/a
 
      07-31-2012
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 <(E-Mail Removed)>

>
> > 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 becomesa

>
> >> 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.


 
Reply With Quote
 
 
 
 
88888 Dihedral
Guest
Posts: n/a
 
      07-31-2012
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 <(E-Mail Removed)>

>
> > 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 becomesa

>
> >> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bash shell to Python shell? edwithad Python 4 09-28-2009 07:56 AM
Re: How to pass shell variable to shell script from python D'Arcy J.M. Cain Python 0 02-27-2008 01:56 PM
Re: How to pass shell variable to shell script from python Gerardo Herzig Python 1 02-27-2008 12:19 PM
Re: How to pass shell variable to shell script from python Christian Heimes Python 0 02-27-2008 10:53 AM
can I run unix shell command in the ModelSim shell? clinton__bill@hotmail.com VHDL 2 02-18-2005 10:04 PM



Advertisments