Path: csiph.com!usenet.pasdenom.info!aioe.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed1a.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.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'argument': 0.05; 'c++,': 0.07; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'wrote': 0.14; 'itself,': 0.16; 'java.': 0.16; 'pointer,': 0.16; 'reasonable.': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'silly': 0.16; 'seems': 0.21; 'question': 0.24; 'header:X-Complaints-To:1': 0.27; "doesn't": 0.30; "i'm": 0.30; 'sense': 0.34; 'but': 0.35; 'c++': 0.36; 'curious': 0.36; 'method': 0.36; 'question,': 0.38; 'to:addr :python-list': 0.38; "couldn't": 0.39; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'called': 0.40; 'tell': 0.60; 'first': 0.61; 'name': 0.63; 'kind': 0.63; 'skip:n 10': 0.64; 'anything.': 0.68; 'history,': 0.84; 'subject:self': 0.84; 'subject::': 0.85 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Dave Angel Subject: Re:Origin of 'self' Date: Mon, 3 Mar 2014 01:49:04 -0500 (EST) Organization: news.gmane.org References: X-Gmane-NNTP-Posting-Host: dpc6744192186.direcpc.com X-Newsreader: PiaoHong Usenet NewsReaders 1.36 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: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1393829102 news.xs4all.nl 2964 [2001:888:2000:d::a6]:35401 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:67512 Westley Martínez Wrote in message: > I understand that in an object method the first argument in the object itself, called self. However, it doesn't have to be called self, and can be called anything. So my question is why is it called self and not this like from C++ and Java. It's kind of a silly question, but one that I'm curious about nevertheless. > I couldn't tell you the history, but I can say it makes sense to me. In c++, this is a pointer, and the name this seems reasonable. But in python it's a reference, a reference to myself. -- DaveA