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: 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 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> <528f6989$0$29992$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 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.