Re: Linux shell to python

Discussion in 'Python' started by Mark Lawrence, Jul 31, 2012.

  1. On 31/07/2012 02:20, Dennis Lee Bieber wrote:
    > On Mon, 30 Jul 2012 22:56:48 +0000, Dan Stromberg <>
    > 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.
     
    Mark Lawrence, Jul 31, 2012
    #1
    1. Advertisements

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

    >
    > > 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.
     
    88888 Dihedral, Jul 31, 2012
    #2
    1. Advertisements

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

    >
    > > 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.
     
    88888 Dihedral, Jul 31, 2012
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    2
    Views:
    6,883
    Jonathan Bromley
    Feb 18, 2005
  2. Ernesto
    Replies:
    6
    Views:
    861
    Magnus Lycka
    Sep 13, 2005
  3. Frank Potter

    Is any python like linux shell?

    Frank Potter, Jan 21, 2007, in forum: Python
    Replies:
    7
    Views:
    505
    Jorgen Grahn
    Jan 22, 2007
  4. Gerardo Herzig
    Replies:
    1
    Views:
    1,413
    Philipp Pagel
    Feb 27, 2008
  5. Gros Bedo
    Replies:
    2
    Views:
    1,592
    Piet van Oostrum
    Jul 10, 2008
  6. Gros Bedo
    Replies:
    1
    Views:
    808
    Piet van Oostrum
    Jul 10, 2008
  7. edwithad

    Bash shell to Python shell?

    edwithad, Sep 28, 2009, in forum: Python
    Replies:
    4
    Views:
    2,129
  8. Chris Angelico

    Re: Linux shell to python

    Chris Angelico, Jul 30, 2012, in forum: Python
    Replies:
    1
    Views:
    261
    å¼ å°‘åŽ
    Jul 30, 2012
Loading...