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


Groups > comp.lang.python > #91254

Re: should "self" be changed?

Path csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <lac@openend.se>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.000
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'operator': 0.03; 'guido': 0.05; 'transform': 0.05; 'stops': 0.07; "object's": 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'cc:addr:python-list': 0.10; 'def': 0.14; '>that': 0.16; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'did.': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'invokes': 0.16; 'message- id:@fido.openend.se': 0.16; 'received:89.233': 0.16; 'received:89.233.217': 0.16; 'received:89.233.217.133': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'thoughts?': 0.16; 'looked': 0.16; 'laura': 0.18; 'variable': 0.20; 'cc:addr:python.org': 0.21; 'cc:2**1': 0.22; 'parameter': 0.22; 'rid': 0.22; '2015': 0.23; 'header:In-Reply-To:1': 0.24; 'parameters': 0.27; "doesn't": 0.28; '-0700,': 0.29; 'dictionary': 0.29; 'name?': 0.29; 'received:se': 0.29; 'url:2008': 0.29; 'url:se': 0.29; 'cc:no real name:2**1': 0.29; 'getting': 0.33; 'class': 0.33; 'symbol': 0.33; 'changing': 0.34; 'subject:?': 0.34; 'list,': 0.36; 'created': 0.36; 'subject:" ': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'tue,': 0.38; 'rather': 0.38; 'self': 0.38; 'method': 0.39; 'seem': 0.39; 'even': 0.61; "you've": 0.61; 'header:Message-Id:1': 0.62; 'become': 0.62; 'genuine': 0.63; 'needs,': 0.63; 'url:10': 0.79; 'received:89': 0.80; 'confusing': 0.84; 'subject:self': 0.84
To zipher <dreamingforward@gmail.com>
cc python-list@python.org, lac@openend.se
From Laura Creighton <lac@openend.se>
Subject Re: should "self" be changed?
In-Reply-To Message from zipher <dreamingforward@gmail.com> of "Tue, 26 May 2015 09:37:29 -0700." <551c8229-f426-45f0-a0ee-fdad1b161f59@googlegroups.com>
References <551c8229-f426-45f0-a0ee-fdad1b161f59@googlegroups.com>
MIME-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-ID <19536.1432659439.1@fido>
Content-Transfer-Encoding quoted-printable
Date Tue, 26 May 2015 18:57:19 +0200
X-Greylist Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [89.233.217.130]); Tue, 26 May 2015 18:57:20 +0200 (CEST)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
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.60.1432659453.5151.python-list@python.org> (permalink)
Lines 33
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1432659453 news.xs4all.nl 2933 [2001:888:2000:d::a6]:38076
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:91254

Show key headers only | View raw


In a message of Tue, 26 May 2015 09:37:29 -0700, zipher writes:
>Would it be prudent to rid the long-standing "argument" (pun unintended) about self and the ulterior spellings of it, by changing it into a symbol rather than a name?  
>
>Something like:
>
>class MyClass(object):
>
>    def __init__(@):
>        @.dummy = None
>
>OR, even better, getting *rid of it* in the parameter list, so it stops confusing people about how many parameters a method needs, and transform it into a true *operator*.
>
>class MyClass(object):
>
>    def __init__(): #takes no arguments!
>        @.dummy = None  #the @ invokes the class object's dictionary
>
>That would seem to be a nice solution to the problem, really.  It doesn't become PERLish because you've made it into a genuine operator -- "self" was always a non-variable that looked like a variable and hence created an itch that couldn't be scratched.
>
>Anyone else have any thoughts?

Guido did.  :)
http://neopythonic.blogspot.se/2008/10/why-explicit-self-has-to-stay.html

Laura

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


Thread

should "self" be changed? zipher <dreamingforward@gmail.com> - 2015-05-26 09:37 -0700
  Re: should "self" be changed? Laura Creighton <lac@openend.se> - 2015-05-26 18:57 +0200
    Re: should "self" be changed? zipher <dreamingforward@gmail.com> - 2015-05-26 20:01 -0700
    Re: should "self" be changed? zipher <dreamingforward@gmail.com> - 2015-05-26 20:15 -0700
  Re: should "self" be changed? Laurent Pointal <laurent.pointal@free.fr> - 2015-05-26 18:59 +0200
  Re: should "self" be changed? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-26 18:28 +0100
    Re: should "self" be changed? zipher <dreamingforward@gmail.com> - 2015-05-26 19:48 -0700
      Re: should "self" be changed? zipher <dreamingforward@gmail.com> - 2015-05-26 20:17 -0700
        Re: should "self" be changed? Ben Finney <ben+python@benfinney.id.au> - 2015-05-27 14:39 +1000
          Re: should "self" be changed? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-27 15:47 +1000
            Re: should "self" be changed? Ben Finney <ben+python@benfinney.id.au> - 2015-05-27 21:29 +1000
              Re: should "self" be changed? zipher <dreamingforward@gmail.com> - 2015-05-27 05:40 -0700
                Re: should "self" be changed? Todd <toddrjen@gmail.com> - 2015-05-27 15:00 +0200
                Re: should "self" be changed? Grant Edwards <invalid@invalid.invalid> - 2015-05-27 14:19 +0000
                Re: should "self" be changed? zipher <dreamingforward@gmail.com> - 2015-05-30 16:18 -0700
            Re: should "self" be changed? zipher <dreamingforward@gmail.com> - 2015-05-30 16:10 -0700
          Re: should "self" be changed? zipher <dreamingforward@gmail.com> - 2015-05-30 16:13 -0700
  Re: should "self" be changed? Chris Angelico <rosuav@gmail.com> - 2015-05-27 03:31 +1000
  Re: should "self" be changed? random832@fastmail.us - 2015-05-26 14:11 -0400
  Re: should "self" be changed? Marko Rauhamaa <marko@pacujo.net> - 2015-05-26 22:46 +0300
    Re: should "self" be changed? Ned Batchelder <ned@nedbatchelder.com> - 2015-05-26 13:04 -0700
      Re: should "self" be changed? Marko Rauhamaa <marko@pacujo.net> - 2015-05-26 23:36 +0300
        Re: should "self" be changed? Anssi Saari <as@sci.fi> - 2015-05-28 17:07 +0300
          Re: should "self" be changed? Marko Rauhamaa <marko@pacujo.net> - 2015-05-28 18:01 +0300
            Re: should "self" be changed? Ian Kelly <ian.g.kelly@gmail.com> - 2015-05-28 09:40 -0600
              Re: should "self" be changed? Marko Rauhamaa <marko@pacujo.net> - 2015-05-28 19:59 +0300
                Re: should "self" be changed? Chris Angelico <rosuav@gmail.com> - 2015-05-29 03:06 +1000
                Re: should "self" be changed? zipher <dreamingforward@gmail.com> - 2015-05-30 16:39 -0700
            Re: should "self" be changed? Steven D'Aprano <steve@pearwood.info> - 2015-05-29 12:00 +1000
              Re: should "self" be changed? Steven D'Aprano <steve@pearwood.info> - 2015-05-29 15:46 +1000
              Re: should "self" be changed? Steven D'Aprano <steve@pearwood.info> - 2015-06-03 02:50 +1000
                Re: should "self" be changed? "Dr. BigCock" <dreamingforward@gmail.com> - 2015-06-02 10:16 -0700
                Re: should "self" be changed? Marko Rauhamaa <marko@pacujo.net> - 2015-06-02 20:19 +0300
                Re: should "self" be changed? "Dr. Bigcock" <dreamingforward@gmail.com> - 2015-06-02 11:02 -0700
                Re: should "self" be changed? Ian Kelly <ian.g.kelly@gmail.com> - 2015-06-02 19:39 -0600
                Re: should "self" be changed? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-06-03 17:05 +1000
    Re: should "self" be changed? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-27 15:20 +1000
  Re: should "self" be changed? garabik-news-2005-05@kassiopeia.juls.savba.sk - 2015-05-26 20:26 +0000
    Re: should "self" be changed? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2015-05-26 21:45 +0100
      Re: should "self" be changed? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-27 15:23 +1000
        Re: should "self" be changed? Chris Angelico <rosuav@gmail.com> - 2015-05-27 16:32 +1000
          Re: should "self" be changed? Marko Rauhamaa <marko@pacujo.net> - 2015-05-27 10:39 +0300
            Re: should "self" be changed? Chris Angelico <rosuav@gmail.com> - 2015-05-27 18:20 +1000
            Re: should "self" be changed? zipher <dreamingforward@gmail.com> - 2015-05-30 16:15 -0700
        Re: should "self" be changed? Terry Reedy <tjreedy@udel.edu> - 2015-05-27 17:59 -0400
    Re: should "self" be changed? Vito De Tullio <vito.detullio@gmail.com> - 2015-05-26 23:17 +0200
    Re: should "self" be changed? Tim Chase <python.list@tim.thechases.com> - 2015-05-26 16:10 -0500
  Re: should "self" be changed? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-05-27 15:17 +1000

csiph-web