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


Groups > comp.lang.python > #92472

Re: I don't like the OO part of python. In particular the "self" keyword everywhere.

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!border1.nntp.ams1.giganews.com!nntp.giganews.com!usenetcore.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.007
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'compiler': 0.05; 'subject:don': 0.09; 'type)': 0.09; 'variables,': 0.09; 'cc:addr :python-list': 0.10; 'thu,': 0.15; '"global"': 0.16; 'attributes,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'subject:python.': 0.16; 'wrote:': 0.16; 'variable': 0.20; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'c++,': 0.22; '2015': 0.23; 'seems': 0.24; 'header:In-Reply-To:1': 0.24; 'figure': 0.27; 'message-id:@mail.gmail.com': 0.28; 'flying': 0.29; 'implicitly': 0.29; 'subject:like': 0.29; 'maybe': 0.31; 'class': 0.33; 'received:google.com': 0.34; 'subject:: ': 0.37; '(with': 0.38; 'self': 0.38; 'wanted': 0.39; 'pm,': 0.39; 'data': 0.40; 'where': 0.40; 'subject:the': 0.40; 'subject:. ': 0.66; 'chrisa': 0.84; 'subject:self': 0.84; 'to:none': 0.90
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type; bh=/h/9H7447HOoHJXg11mEjf/7lZlLmEK/dWVhIG3kz/Q=; b=j5f+m9cAzTP++YYE9JwFd2ZXD3OUNJAuLmuoXMHLimkgY2l+HAjHJKHVyteFrCu3u5 T0DZ+bRcu2K91e5MXjgRAYnl4/3jTk7837k5Fr7VR8820beak5KD7/tqltyd8Zdf0Y9X zJYOkUDshuU7T2dnHRSCpCy2WO+g14FdOFfn8Yqj9WyrFaxnWPc4DuGyTMd++RAiU2uX PiB2b/KSGnQimn4V/iV9U6+7iIDFZvGuE7J51NgFeQEZIAqg37AChU2Ro3E2aQjpPsTd UODH7HCSfg98zcyvMX4LeJIUJHr2a/biSFSoUErvsEhhFi/oGaaCmLdbUfYlF2XxXLdP n1Rg==
MIME-Version 1.0
X-Received by 10.43.159.193 with SMTP id lz1mr10182508icc.26.1434022686873; Thu, 11 Jun 2015 04:38:06 -0700 (PDT)
In-Reply-To <77496$55797095$5419aafe$48148@news.ziggo.nl>
References <a91ad$55796ed2$5419aafe$46975@news.ziggo.nl> <77496$55797095$5419aafe$48148@news.ziggo.nl>
Date Thu, 11 Jun 2015 21:38:06 +1000
Subject Re: I don't like the OO part of python. In particular the "self" keyword everywhere.
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
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.393.1434022695.13271.python-list@python.org> (permalink)
Lines 21
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1434022695 news.xs4all.nl 2916 [2001:888:2000:d::a6]:43645
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:92472

Show key headers only | View raw


On Thu, Jun 11, 2015 at 9:27 PM, Skybuck Flying <skybuck2000@hotmail.com> wrote:
> If I wanted to access a global variable I would use the existing "global"
> thing
>
> global SomeField...
>
> maybe if I wanted to use a local variable for routine:
>
> local SomeField...
>
> seems nicer... then having to use self everywhere...

Oops, missent.

If you want this, how about simply declaring all function-local
variables, and having everything else be implicitly global? Or declare
(with data type) all globals, all class attributes, and all locals,
and then let the compiler figure out what you want? Because if you
want ECMAScript or C++, you know where to find them.

ChrisA

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


Thread

I don't like the OO part of python. In particular the "self" keyword everywhere. "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-06-11 13:19 +0200
  Re: I don't like the OO part of python. In particular the "self" keyword everywhere. "Skybuck Flying" <skybuck2000@hotmail.com> - 2015-06-11 13:27 +0200
    Re: I don't like the OO part of python. In particular the "self" keyword everywhere. Chris Angelico <rosuav@gmail.com> - 2015-06-11 21:36 +1000
    Re: I don't like the OO part of python. In particular the "self" keyword everywhere. Chris Angelico <rosuav@gmail.com> - 2015-06-11 21:38 +1000
    Re: I don't like the OO part of python. In particular the "self" keyword everywhere. MRAB <python@mrabarnett.plus.com> - 2015-06-11 13:16 +0100
      Re: I don't like the OO part of python. In particular the "self" keyword everywhere. Thomas Mlynarczyk <thomas@mlynarczyk-webdesign.de> - 2015-06-11 17:32 +0200
  Re: I don't like the OO part of python. In particular the "self" keyword everywhere. Michael Torrie <torriem@gmail.com> - 2015-06-11 08:15 -0600
  Re: I don't like the OO part of python. In particular the "self" keyword everywhere. Rustom Mody <rustompmody@gmail.com> - 2015-06-11 09:39 -0700
  Re: I don't like the OO part of python. In particular the "self" keyword everywhere. sohcahtoa82@gmail.com - 2015-06-11 09:55 -0700

csiph-web