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


Groups > comp.lang.python > #61259

Re: One liners

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!goblin1!goblin2!goblin.stu.neva.ru!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rasmussen.bryan@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.053
X-Spam-Evidence '*H*': 0.89; '*S*': 0.00; 'variables': 0.07; 'string': 0.09; 'assigning': 0.09; 'dan': 0.09; 'python': 0.11; 'mostly': 0.14; 'culturally': 0.16; 'names?': 0.16; 'of)': 0.16; 'sat,': 0.16; 'wrote:': 0.18; 'trying': 0.19; 'seems': 0.21; 'example': 0.22; 'email addr:gmail.com&gt;': 0.22; "haven't": 0.24; 'sort': 0.25; '&gt;': 0.26; 'long,': 0.26; 'header:In-Reply- To:1': 0.27; 'michael': 0.29; 'am,': 0.29; 'dec': 0.30; 'direction': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'url:mailman': 0.30; '(which': 0.31; 'code': 0.31; 'getting': 0.31; 'lines': 0.31; 'multiline': 0.31; 'perl': 0.31; 'anyone': 0.31; 'there.': 0.32; 'url:python': 0.33; 'fri,': 0.33; 'maybe': 0.34; 'skip:s 30': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'really': 0.36; 'culture': 0.36; 'url:listinfo': 0.36; 'url:org': 0.36; 'too': 0.37; 'turn': 0.37; 'list.': 0.37; 'expressed': 0.37; 'being': 0.38; 'to:addr:python- list': 0.38; 'pm,': 0.38; 'does': 0.39; 'bad': 0.39; 'to:addr:python.org': 0.39; 'url:mail': 0.40; 'first': 0.61; 'more': 0.64; 'temporary': 0.65; 'beautiful': 0.68; 'physical': 0.72; 'subject:One': 0.74; 'complex,': 0.84; 'expressive': 0.84; 'itself?': 0.84; 'yours': 0.88; 'trend': 0.91; '2013': 0.98
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=K1/yns1x5anBxGv7X5ZFulXEJO4gqzuoBtBudoZpoAs=; b=R2w7ecyll4EwEAAYKnRvuRf7cVgt3WvYBFTBxx16jEI1NGDGQ8ZWjY/tzHeR3hrJSW exwPMgeFqIUX/aRt5/nzmfxphYbavPj0fjOT+UcrEr9R1B6rjwRSd0Ep0Na5+BMeCorW 2X/0L7gUDx1EnYK5Y/WRmWkXgSBQe4xiP08/KqlazGiaK1o6uA4uNiVV4puUHA7Bvm3a qOgmM01YdGSTd6BKl3zzIT70Cd08bHU3dZoCsPQUh1w7yiwaMvAxa/1r+5t8V9dMJWmf xAWCaauqUoom45OXq+cIRZOZ2kztbzPEcV/x2yLpI7UiMFmemHbMSRz1c9RxNc8LulAH 1OGA==
MIME-Version 1.0
X-Received by 10.181.11.169 with SMTP id ej9mr8427440wid.13.1386463273291; Sat, 07 Dec 2013 16:41:13 -0800 (PST)
In-Reply-To <CAGGBd_rsP3rU6X30W_ocF8vNrPrLBrivT+nCv-1htgehmPZWrg@mail.gmail.com>
References <CAGGBd_o1TS02cosi+q9YeN5rnWJxe5mU7xtCTuTMZGO0ntF5TA@mail.gmail.com> <52A26763.3070803@gmail.com> <CAGGBd_rsP3rU6X30W_ocF8vNrPrLBrivT+nCv-1htgehmPZWrg@mail.gmail.com>
Date Sun, 8 Dec 2013 01:41:13 +0100
Subject Re: One liners
From bryan rasmussen <rasmussen.bryan@gmail.com>
To python-list@python.org
Content-Type multipart/alternative; boundary=f46d043be1fce614d504ecfb2216
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3710.1386463274.18130.python-list@python.org> (permalink)
Lines 113
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1386463274 news.xs4all.nl 2911 [2001:888:2000:d::a6]:39372
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:61259

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Someone was thinking in ruby there.



On Sat, Dec 7, 2013 at 1:14 AM, Dan Stromberg <drsalists@gmail.com> wrote:

>
> On Fri, Dec 6, 2013 at 4:10 PM, Michael Torrie <torriem@gmail.com> wrote:
>
>> On 12/06/2013 04:54 PM, Dan Stromberg wrote:
>> > Does anyone else feel like Python is being dragged too far in the
>> direction
>> > of long, complex, multiline one-liners?  Or avoiding temporary variables
>> > with descriptive names?  Or using regex's for everything under the sun?
>> >
>> > What happened to using classes?  What happened to the beautiful
>> emphasis on
>> > readability?  What happened to debuggability (which is always harder
>> than
>> > writing things in the first place)?  And what happened to string
>> methods?
>> >
>> > I'm pleased to see Python getting more popular, but it feels like a lot
>> of
>> > newcomers are trying their best to turn Python into Perl or something,
>> > culturally speaking.
>>
>> I have not seen any evidence that this trend of yours is widespread.
>> The Python code I come across seems pretty normal to me.  Expressive and
>> readable.  Haven't seen any attempt to turn Python into Perl or that
>> sort of thing.  And I don't see that culture expressed on the list.
>> Maybe I'm just blind...
>
>
> I'm thinking mostly of stackoverflow, but here's an example I ran into (a
> lot of) on a job:
>
> somevar = some_complicated_thing(somevar) if
> some_other_complicated_thing(somevar) else somevar
>
> Would it really be so bad to just use an if statement?  Why are we
> assigning somevar to itself?  This sort of thing was strewn across 3 or 4
> physical lines at a time.
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
>
>

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


Thread

Re: One liners bryan rasmussen <rasmussen.bryan@gmail.com> - 2013-12-08 01:41 +0100

csiph-web