Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #38568
| Path | csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!cs.uu.nl!news.stack.nl!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <oscar.j.benjamin@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.010 |
| X-Spam-Evidence | '*H*': 0.98; '*S*': 0.00; 'explicitly': 0.04; 'practice,': 0.07; 'used.': 0.07; 'iterate': 0.09; 'cc:addr :python-list': 0.10; 'programmer': 0.11; 'sat,': 0.15; 'agree.': 0.16; 'cc:name:python list': 0.16; 'guessing': 0.16; 'iterator': 0.16; 'janssen': 0.16; 'mutated': 0.16; 'order?': 0.16; 'wrote:': 0.17; '>>>': 0.18; 'feb': 0.19; 'this:': 0.23; 'cc:2**1': 0.24; 'specifically': 0.24; 'cc:addr:python.org': 0.25; 'header:In- Reply-To:1': 0.25; 'values': 0.26; 'cc:addr:gmail.com': 0.27; 'order.': 0.27; 'object,': 0.27; 'message-id:@mail.gmail.com': 0.27; 'correct': 0.28; 'this?': 0.28; 'chris': 0.28; 'knows': 0.30; 'point': 0.31; 'johnson': 0.32; 'structure': 0.32; 'agree': 0.34; 'received:google.com': 0.34; 'requiring': 0.35; 'doing': 0.35; 'pm,': 0.35; 'there': 0.35; 'method': 0.36; 'should': 0.36; 'why': 0.37; 'far': 0.37; 'data': 0.37; 'subject:: ': 0.38; 'mark': 0.38; 'object': 0.38; 'gives': 0.39; 'apply': 0.39; 'think': 0.40; 'easy': 0.60; 'remove': 0.61; 'further': 0.61; 'more': 0.63; 'reverse': 0.65; 'potentially': 0.66; '2013': 0.84; 'advertises': 0.84; 'oscar': 0.84; 'rick': 0.91 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=PmDEf2zqqi0FV1S/dO79ip4zUnlO6cleSZ/5L+0yZl8=; b=kYdPR4kszsmFkSuCy1lrmBBvy5BI9dQRLxvy15y1iX2uIsXCmS8vE15RK3NMNg21ZE NQVRh2gDSZ5AX4WVAKbP4Dyf61YFOt+GRR2gbe3+zeyLVozDr0MDRhGGN+4GqDCYjMYf 1ZX71vkqUuP4JmtYWh0fZaNxMv0I9ctThEWLyTykVLGsWesQ+n3kz5Ap+NFkTkG2x/Bw zXIp3buKsXQyUQvMWAiULnQQV74abQhuLlyeuds831ACjl2B8+MfCYhwczQK+16jRGx8 4fqrXR4eNcIr/5IZzCmBKZbwrSR8oQs0iuvb3uRj+s+jQSGdClhxd8Uxi/iuyUeMRNhB BdnQ== |
| X-Received | by 10.152.125.239 with SMTP id mt15mr10109946lab.26.1360503020401; Sun, 10 Feb 2013 05:30:20 -0800 (PST) |
| MIME-Version | 1.0 |
| In-Reply-To | <CAMjeLr_4Udj+LN8B7Wmjw9XVEx7VSVG7Kxu3cp4GA5Lo1tVhig@mail.gmail.com> |
| References | <680e50a4-6569-49cf-b369-0be450545d50@googlegroups.com> <5115c455$0$6574$c3e8da3$5496439d@news.astraweb.com> <d405822d-2252-4a85-8ab2-38ca88963d91@googlegroups.com> <CAPTjJmrCK+LGo5ijg6S0p2q1jHKt-bFfuOZqFm3ZtuACOPaSdw@mail.gmail.com> <CAMjeLr_4Udj+LN8B7Wmjw9XVEx7VSVG7Kxu3cp4GA5Lo1tVhig@mail.gmail.com> |
| From | Oscar Benjamin <oscar.j.benjamin@gmail.com> |
| Date | Sun, 10 Feb 2013 13:30:00 +0000 |
| Subject | Re: LangWart: Method congestion from mutate multiplicty |
| To | Mark Janssen <dreamingforward@gmail.com> |
| Content-Type | text/plain; charset=ISO-8859-1 |
| Cc | Python List <python-list@python.org> |
| 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 | <http://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 | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1579.1360503028.2939.python-list@python.org> (permalink) |
| Lines | 26 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1360503028 news.xs4all.nl 6954 [2001:888:2000:d::a6]:55099 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:38568 |
Show key headers only | View raw
On 10 February 2013 04:53, Mark Janssen <dreamingforward@gmail.com> wrote: > On Sat, Feb 9, 2013 at 8:20 PM, Chris Angelico <rosuav@gmail.com> wrote: >> On Sun, Feb 10, 2013 at 2:54 PM, Rick Johnson >> <rantingrickjohnson@gmail.com> wrote: >>> My point was this: All mutate methods should mutate "in-place", if the programmer wishes to create a mutated copy of the object, then the programmer should /explicitly/ create a copy of the object and then apply the correct mutator method to the copy. >> >> I agree. And we can go further and declare that there is only one data >> [sarcasm] > > I have to agree with Rick, I think requiring the user to explicitly > create a new object, which is already a good and widely-used practice, > should be the Only One Way to Do It. Why should I copy a potentially large data structure just to iterate over it in reverse order? And why on earth would you want to remove the more efficient ways of doing this? > Guessing method names is far suboptimal to this simple, easy idiom. There is no guessing. If the object has a __reverse__ method then it specifically advertises that it knows how to create an iterator that gives its values in reverse order. Otherwise __len__ and __getitem__ are used. Oscar
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
LangWart: Method congestion from mutate multiplicty Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-08 17:50 -0800
Re: LangWart: Method congestion from mutate multiplicty Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-09 14:36 +1100
Re: LangWart: Method congestion from mutate multiplicty Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-09 19:54 -0800
Re: LangWart: Method congestion from mutate multiplicty Chris Angelico <rosuav@gmail.com> - 2013-02-10 15:20 +1100
Re: LangWart: Method congestion from mutate multiplicty Mark Janssen <dreamingforward@gmail.com> - 2013-02-09 20:53 -0800
Re: LangWart: Method congestion from mutate multiplicty Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-11 01:29 +1100
Re: LangWart: Method congestion from mutate multiplicty Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2013-02-10 14:03 -0500
Re: LangWart: Method congestion from mutate multiplicty Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-11 11:11 +1100
Re: LangWart: Method congestion from mutate multiplicty Mark Janssen <dreamingforward@gmail.com> - 2013-02-10 13:28 -0800
Re: LangWart: Method congestion from mutate multiplicty Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-11 11:10 +1100
Re: LangWart: Method congestion from mutate multiplicty Mark Janssen <dreamingforward@gmail.com> - 2013-02-10 17:14 -0800
Re: LangWart: Method congestion from mutate multiplicty Chris Angelico <rosuav@gmail.com> - 2013-02-11 08:51 +1100
Re: LangWart: Method congestion from mutate multiplicty Mark Janssen <dreamingforward@gmail.com> - 2013-02-10 14:01 -0800
Re: LangWart: Method congestion from mutate multiplicty Terry Reedy <tjreedy@udel.edu> - 2013-02-10 03:39 -0500
Re: LangWart: Method congestion from mutate multiplicty Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-10 10:45 -0800
Re: LangWart: Method congestion from mutate multiplicty Terry Reedy <tjreedy@udel.edu> - 2013-02-10 16:44 -0500
Re: LangWart: Method congestion from mutate multiplicty Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-11 11:11 +1100
Re: LangWart: Method congestion from mutate multiplicty Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-10 10:45 -0800
Re: LangWart: Method congestion from mutate multiplicty Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-10 22:29 +1100
Re: LangWart: Method congestion from mutate multiplicty Chris Angelico <rosuav@gmail.com> - 2013-02-11 00:24 +1100
Re: LangWart: Method congestion from mutate multiplicty Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-11 01:00 +1100
Re: LangWart: Method congestion from mutate multiplicty Tim Chase <python.list@tim.thechases.com> - 2013-02-10 07:52 -0600
Re: LangWart: Method congestion from mutate multiplicty Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-10 15:59 -0800
Re: LangWart: Method congestion from mutate multiplicty Tim Chase <python.list@tim.thechases.com> - 2013-02-10 18:12 -0600
Re: LangWart: Method congestion from mutate multiplicty Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-10 17:24 -0800
Re: LangWart: Method congestion from mutate multiplicty Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-10 17:24 -0800
Re: LangWart: Method congestion from mutate multiplicty Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-11 11:36 +1100
Re: LangWart: Method congestion from mutate multiplicty MRAB <python@mrabarnett.plus.com> - 2013-02-11 02:03 +0000
Re: LangWart: Method congestion from mutate multiplicty Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-11 04:53 -0800
Re: LangWart: Method congestion from mutate multiplicty Chris Angelico <rosuav@gmail.com> - 2013-02-12 00:27 +1100
Re: LangWart: Method congestion from mutate multiplicty Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-11 20:55 -0800
Re: LangWart: Method congestion from mutate multiplicty Mark Janssen <dreamingforward@gmail.com> - 2013-02-11 21:28 -0800
Re: LangWart: Method congestion from mutate multiplicty Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-12 12:46 -0800
Re: LangWart: Method congestion from mutate multiplicty Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-12 12:46 -0800
Re: LangWart: Method congestion from mutate multiplicty Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-11 20:55 -0800
Re: LangWart: Method congestion from mutate multiplicty alex23 <wuwei23@gmail.com> - 2013-02-10 18:05 -0800
Re: LangWart: Method congestion from mutate multiplicty Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-11 07:19 +0000
Re: LangWart: Method congestion from mutate multiplicty Chris Angelico <rosuav@gmail.com> - 2013-02-11 18:24 +1100
Re: LangWart: Method congestion from mutate multiplicty Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-02-11 07:35 +0000
Re: LangWart: Method congestion from mutate multiplicty Tim Chase <tim@thechases.com> - 2013-02-11 06:04 -0600
Re: LangWart: Method congestion from mutate multiplicty Serhiy Storchaka <storchaka@gmail.com> - 2013-02-11 19:07 +0200
Re: LangWart: Method congestion from mutate multiplicty Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2013-02-10 13:30 +0000
Re: LangWart: Method congestion from mutate multiplicty Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-10 16:25 -0800
Re: LangWart: Method congestion from mutate multiplicty Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-11 11:42 +1100
Re: LangWart: Method congestion from mutate multiplicty Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-10 16:25 -0800
Re: LangWart: Method congestion from mutate multiplicty Mark Janssen <dreamingforward@gmail.com> - 2013-02-10 10:45 -0800
Re: LangWart: Method congestion from mutate multiplicty 88888 Dihedral <dihedral88888@googlemail.com> - 2013-02-10 06:33 -0800
Re: LangWart: Method congestion from mutate multiplicty Chris Angelico <rosuav@gmail.com> - 2013-02-09 15:51 +1100
Re: LangWart: Method congestion from mutate multiplicty alex23 <wuwei23@gmail.com> - 2013-02-10 17:56 -0800
Re: LangWart: Method congestion from mutate multiplicty Chris Angelico <rosuav@gmail.com> - 2013-02-12 19:06 +1100
Re: LangWart: Method congestion from mutate multiplicty Neil Hodgson <nhodgson@iinet.net.au> - 2013-02-10 20:53 +1100
Re: LangWart: Method congestion from mutate multiplicty Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-02-10 22:30 +1100
Re: LangWart: Method congestion from mutate multiplicty Rick Johnson <rantingrickjohnson@gmail.com> - 2013-02-10 10:55 -0800
Re: LangWart: Method congestion from mutate multiplicty Neil Hodgson <nhodgson@iinet.net.au> - 2013-02-11 08:57 +1100
csiph-web