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


Groups > comp.lang.python > #60237

Re: Method chaining

Path csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <antoon.pardon@rece.vub.ac.be>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.048
X-Spam-Evidence '*H*': 0.90; '*S*': 0.00; 'received:134': 0.05; 'obj': 0.09; 'omit': 0.09; "people's": 0.09; 'programs.': 0.14; 'really?': 0.16; 'wrote:': 0.18; 'code.': 0.18; '>>>': 0.22; 'header:User-Agent:1': 0.23; 'scroll': 0.24; 'space.': 0.24; "i've": 0.25; 'header:In-Reply-To:1': 0.27; '+0100,': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'vertical': 0.31; 'skip:m 30': 0.32; 'run': 0.32; 'fri,': 0.33; 'style': 0.33; 'except': 0.35; 'but': 0.35; 'really': 0.36; 'nov': 0.38; 'to:addr:python-list': 0.38; 'short': 0.38; 'to:addr:python.org': 0.39; 'space': 0.40; 'first': 0.61; 'such': 0.63; 'more': 0.64; 'details,': 0.68; 'cuts': 0.84; 'otten': 0.84; '2013': 0.98
X-IronPort-Anti-Spam-Filtered true
X-IronPort-Anti-Spam-Result Ap8EAPJ5j1KGuA9G/2dsb2JhbABZvSWDA4E4gxkBAQV4EQsYCRYPCQMCAQIBRRMIAod9uWyHVRePDhaEHAOYFIYti2WDKQ
Date Fri, 22 Nov 2013 16:38:27 +0100
From Antoon Pardon <antoon.pardon@rece.vub.ac.be>
User-Agent Mozilla/5.0 (X11; Linux i686; rv:10.0.12) Gecko/20130116 Icedove/10.0.12
MIME-Version 1.0
To python-list@python.org
Subject Re: Method chaining
References <528f3f4e$0$29992$c3e8da3$5496439d@news.astraweb.com> <mailman.3035.1385122060.18130.python-list@python.org> <528f6989$0$29992$c3e8da3$5496439d@news.astraweb.com> <l6nslo$3g3$1@ger.gmane.org>
In-Reply-To <l6nslo$3g3$1@ger.gmane.org>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
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.3045.1385134715.18130.python-list@python.org> (permalink)
Lines 35
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1385134715 news.xs4all.nl 15883 [2001:888:2000:d::a6]:35361
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:60237

Show key headers only | View raw


Op 22-11-13 16:20, Peter Otten schreef:
> Steven D'Aprano wrote:
> 
>> On Fri, 22 Nov 2013 13:08:03 +0100, Peter Otten wrote:
>>
>>> These things are nice to write as long as you omit the gory details, but
>>> personally I don't want to see the style it favours in my or other
>>> people's code.
>>
>> There's not really a lot of difference 
> 
> That cuts both ways ;)
> 
>> between:
>>
>>     obj = MyClass()
>>     obj.spam()
>>     obj.eggs()
>>     obj.cheese()
>>
>> and
>>
>>     obj = MyClass().spam().eggs().cheese()
>>
>>
>> except the first takes up a lot more vertical space. 
> 
> I've not yet run short of vertical space ;)

Really? Then you must write only very short programs. Me I
continuously run out of vertical space. That is why I need
to use such tools as scroll bars.

-- 
Antoon Pardon.

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


Thread

Method chaining Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-22 11:26 +0000
  Re: Method chaining Chris Angelico <rosuav@gmail.com> - 2013-11-22 22:44 +1100
  Re: Method chaining Peter Otten <__peter__@web.de> - 2013-11-22 13:08 +0100
    Re: Method chaining Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-22 14:26 +0000
      Re: Method chaining Peter Otten <__peter__@web.de> - 2013-11-22 16:20 +0100
        Re: Method chaining Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-22 16:26 +0000
          Re: Method chaining Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2013-11-22 16:52 +0000
          Re: Method chaining Wolfgang Maier <wolfgang.maier@biologie.uni-freiburg.de> - 2013-11-22 17:55 +0000
      Re: Method chaining Antoon Pardon <antoon.pardon@rece.vub.ac.be> - 2013-11-22 16:38 +0100
      Re: Method chaining Laszlo Nagy <gandalf@shopzeus.com> - 2013-11-23 17:08 +0100
  Re: Method chaining Terry Reedy <tjreedy@udel.edu> - 2013-11-22 07:34 -0500
    Re: Method chaining Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-22 14:30 +0000
  Re: Method chaining Rotwang <sg552@hotmail.co.uk> - 2013-11-23 19:53 +0000
    Re: Method chaining Rotwang <sg552@hotmail.co.uk> - 2013-11-24 00:28 +0000
      Re: Method chaining Rotwang <sg552@hotmail.co.uk> - 2013-11-24 00:43 +0000
    Re: Method chaining Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-24 14:27 +0000
      Re: Method chaining Rotwang <sg552@hotmail.co.uk> - 2013-11-24 15:01 +0000

csiph-web