Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'broken': 0.03; '"""': 0.05; 'convention.': 0.07; 'python': 0.11; 'python.': 0.11; 'def': 0.14; 'argument': 0.15; '-tkc': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'programmers,': 0.16; 'readable': 0.16; 'received:174.136': 0.16; 'wrote:': 0.16; 'developers.': 0.22; 'lawrence': 0.22; 'header:In-Reply-To:1': 0.24; 'written': 0.24; 'looks': 0.29; 'relies': 0.29; 'that.': 0.30; 'convention': 0.31; "i'd": 0.31; 'code': 0.31; 'skip:_ 10': 0.32; '[1]': 0.32; 'url:python': 0.33; 'class': 0.33; 'subject:?': 0.34; 'to:addr:python-list': 0.35; 'authors': 0.35; 'but': 0.36; 'being': 0.36; 'url:org': 0.36; 'subject:" ': 0.36; 'received:10': 0.37; 'subject:: ': 0.37; 'self': 0.38; 'method': 0.39; 'url:2': 0.39; 'does': 0.39; 'url:docs': 0.39; 'to:addr:python.org': 0.39; 'mark': 0.40; 'called': 0.40; 'your': 0.60; 'more': 0.62; '8bit%:21': 0.70; 'apart': 0.70; 'special': 0.72; 'subject:self': 0.84; 'absolutely': 0.87; 'url:tutorial': 0.91 X-Sender-Id: wwwh|x-authuser|tim@thechases.com X-Sender-Id: wwwh|x-authuser|tim@thechases.com X-MC-Relay: Neutral X-MailChannels-SenderId: wwwh|x-authuser|tim@thechases.com X-MailChannels-Auth-Id: wwwh X-MC-Loop-Signature: 1432674613986:3875049299 X-MC-Ingress-Time: 1432674613986 Date: Tue, 26 May 2015 16:10:42 -0500 From: Tim Chase To: python-list@python.org Subject: Re: should "self" be changed? In-Reply-To: References: <551c8229-f426-45f0-a0ee-fdad1b161f59@googlegroups.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-AuthUser: tim@thechases.com X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 30 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1432676764 news.xs4all.nl 2851 [2001:888:2000:d::a6]:49506 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:91268 On 2015-05-26 21:45, Mark Lawrence wrote: >> class MyClass(object): >> def __init__(=E1=88=B5): >> =E1=88=B5.dummy =3D None >=20 > Apart from breaking all the tools that rely on "self" being spelt > "self" this looks like an excellent idea. Though to be fair, they *are* broken tools if they rely on "self" since there's nothing in the Python specs that require that. It's just a convention[1]. -tkc [1] https://docs.python.org/2/tutorial/classes.html#random-remarks """ Often, the first argument of a method is called self. This is nothing more than a convention: the name self has absolutely no special meaning to Python. Note, however, that by not following the convention your code may be less readable to other Python programmers, and it is also conceivable that a class browser program might be written that relies upon such a convention. """ It does give fair warning, but I'd consider that a warning to authors of "class browser program[s]" as much as to developers.