Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #91259
| Path | csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <random832@fastmail.us> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'modify': 0.04; 'guido': 0.05; 'model,': 0.05; 'extent': 0.07; 'creighton': 0.09; 'methods,': 0.09; 'received:internal': 0.09; 'python': 0.11; 'argument': 0.15; 'accident.': 0.16; 'argument)': 0.16; 'did.': 0.16; 'hypothetical': 0.16; 'list),': 0.16; 'message- id:@webmail.messagingengine.com': 0.16; 'received:10.202': 0.16; 'received:10.202.2': 0.16; 'received:66.111': 0.16; 'received:66.111.4': 0.16; 'received:messagingengine.com': 0.16; 'wrote:': 0.16; "wouldn't": 0.16; 'case.': 0.18; 'laura': 0.18; '(the': 0.22; 'decorator': 0.22; 'module': 0.23; 'header:In-Reply- To:1': 0.24; 'equivalent': 0.27; 'feature,': 0.29; 'url:2008': 0.29; 'url:se': 0.29; '(which': 0.29; 'function': 0.30; 'keyword': 0.31; 'window': 0.31; 'skip:s 30': 0.31; "can't": 0.32; 'implement': 0.32; 'class': 0.33; 'decorators': 0.33; 'doubt': 0.33; 'subject:?': 0.34; 'to:addr:python-list': 0.35; 'really': 0.35; "isn't": 0.35; 'but': 0.36; 'there': 0.36; 'possible': 0.36; '(and': 0.36; 'subject:" ': 0.36; 'received:10': 0.37; 'subject:: ': 0.37; 'tue,': 0.38; 'received:66': 0.38; 'method': 0.39; 'to:addr:python.org': 0.39; 'called': 0.40; 'some': 0.40; 'from:no real name:2**0': 0.61; 'header:Message-Id:1': 0.62; 'more': 0.62; '26,': 0.72; 'worth': 0.73; 'url:10': 0.79; 'lacks': 0.84; 'misses': 0.84; 'presumably': 0.84; 'subject:self': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha1; c=relaxed/relaxed; d=fastmail.us; h= content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=Z9JIuGP0bAWE4KyIVx9HiJeaVGc=; b=HtwCSw EkHkwqh0w1IIUbQOT7GtRBfp1vMZPhbC7/d0ksqYyPBru7BHb+AeIcxuywA/99pI j6AcrTUsCnBaBsQtN16fih5qEupKEf2LZlhObLYSbMdwuqFk2fmsBFlcO0vK4Jdu 3nGF7RT4xDBIbSah2Y/p6i1ef/Os11qamMBBk= |
| DKIM-Signature | v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=Z9JIuGP0bAWE4Ky IVx9HiJeaVGc=; b=qXVto+NRZYCJkKRCKiOdbXHmGeABq8u5uDICwdwzkk01Low 9cl6V8hkEYqod/t35QZajouuUlNgld+XJDSByqL2eAu8yEZaqk7vJnXa0kChP2Rd YC8yCfar9wolBCNoGWQqFyXSqi5wOGeIwLPtx20rNz170yGCWWOTvHGwA6aw= |
| X-Sasl-Enc | Ktq9SFpobAKoQntUbxkHdQ/9uMX7mvynYw5j+N3G3EqE 1432663902 |
| From | random832@fastmail.us |
| To | python-list@python.org |
| MIME-Version | 1.0 |
| Content-Transfer-Encoding | 7bit |
| Content-Type | text/plain |
| X-Mailer | MessagingEngine.com Webmail Interface - ajax-073992ec |
| Subject | Re: should "self" be changed? |
| Date | Tue, 26 May 2015 14:11:42 -0400 |
| In-Reply-To | <201505261657.t4QGvJYW019538@fido.openend.se> |
| References | <551c8229-f426-45f0-a0ee-fdad1b161f59@googlegroups.com> <201505261657.t4QGvJYW019538@fido.openend.se> |
| 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.63.1432663908.5151.python-list@python.org> (permalink) |
| Lines | 22 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1432663908 news.xs4all.nl 2870 [2001:888:2000:d::a6]:59024 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:91259 |
Show key headers only | View raw
On Tue, May 26, 2015, at 12:57, Laura Creighton wrote: > Guido did. :) > http://neopythonic.blogspot.se/2008/10/why-explicit-self-has-to-stay.html It's worth noting that the "dynamically modify a class" argument (and to some extent the decorator argument) misses Javascript's solution - _any_ function may refer to "this" (which is not in the argument list), which will be the global scope object (the browser window for browser-hosted javascript - presumably the current module for a hypothetical equivalent python feature, though it might be more prudent to simply make it None.) if the function is called without an object reference. Of course, Javascript also lacks bound methods, which makes it much more likely to happen by accident. I can't really think of anything that you can do with decorators, either, in the current model, that you _couldn't_ do in a JS-alike function call model... but I doubt it would be possible to implement backwards-compatibly. In principle, if you added a class keyword (hey, technically, isn't there one already?) you wouldn't need decorators at all for the staticmethod/classmethod/instance method case.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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