Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #80684
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!ecngs!feeder2.ecngs.de!novso.com!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <fabiofz@gmail.com> |
| 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; 'subject:: [': 0.04; 'classes,': 0.05; 'subject:Python': 0.06; '(of': 0.07; 'explanation': 0.09; 'method,': 0.09; 'subject:method': 0.09; 'subject:set': 0.09; 'cc:addr:python-list': 0.11; 'itself.': 0.14; 'cc:name:python list': 0.16; 'fabio': 0.16; 'new-style': 0.16; 'subclass': 0.16; 'subject:Dev': 0.16; 'surprising': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'thu,': 0.19; 'subject:] ': 0.20; 'cc:addr:python.org': 0.22; 'fairly': 0.24; 'cc:2**0': 0.24; '>': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'am,': 0.29; 'is?': 0.30; 'message-id:@mail.gmail.com': 0.30; '13,': 0.31; 'invoke': 0.31; 'class': 0.32; 'implemented': 0.33; 'sense': 0.34; 'maybe': 0.34; 'could': 0.34; 'something': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'instances': 0.36; 'view,': 0.36; 'method': 0.36; 'thanks': 0.36; 'changing': 0.37; 'skip:& 10': 0.38; 'nov': 0.38; 'does': 0.39; 'sure': 0.39; 'how': 0.40; 'future': 0.60; 'break': 0.61; 'more': 0.64; 'worth': 0.66; 'ambiguous': 0.84; 'end-user': 0.84; 'gregory,': 0.84; 'python- dev': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=4mmprcTGVznEXPU88dDtgz3qu6Ir2TT/Dr6IhlO8Lf4=; b=Jc3g/zqFWeb8cC85ipaU8HTA18i6Vv7wuLYE8OBnY41GBq12NeGU/3vabIbXIDkJ8W 4DXMqS1Py1pOjwzRJ8T+BhaTmtacWR35evEIyqantLff98CCrklV2K8xY0y2u7KZPOEl U2HVyo//VZSCYqgLpZ8UlhZKnANvAxgbjhmapRjF/yW1AxpnxXERYtDr6a/MG0LDAaGU /tby3s381a6HQqMKD063zjsBt4eM/R4mdyeIt3roSg1tnQi5/QNa1Qyzq+gAnH/4wYY1 U9fBTDc6KXn8GlaIiytBojrh3YtNsi7AyUiVbFpVUct136AbUalU2wk057znvlAqRGFy RG0w== |
| X-Received | by 10.194.205.132 with SMTP id lg4mr4077694wjc.84.1415885957242; Thu, 13 Nov 2014 05:39:17 -0800 (PST) |
| MIME-Version | 1.0 |
| In-Reply-To | <ccips8Fs5j8U1@mid.individual.net> |
| References | <CAF0TK51TKs+tw=u_rzrWVeSsDK7cOBt1Gcvq_izLfMObuDYNig@mail.gmail.com> <545919B6.7040007@stoneleaf.us> <CAF0TK52vw_SmqexN8RXyGs8GSKecPobK54ZqYPyKgRSSJy9zWw@mail.gmail.com> <mailman.15467.1415128339.18130.python-list@python.org> <c25aa612-bff2-4982-8fb9-5b17a866bead@googlegroups.com> <87a943qyvn.fsf@handshake.de> <545CC204.2010301@stoneleaf.us> <8761eq424e.fsf@handshake.de> <mailman.15584.1415476169.18130.python-list@python.org> <cc7jtiFubltU1@mid.individual.net> <CALwzidnE9ZeHV6nM74hKX58LhZ0ova5qB60-eWbw2gLTtk+O3Q@mail.gmail.com> <mailman.15726.1415806493.18130.python-list@python.org> <ccips8Fs5j8U1@mid.individual.net> |
| From | Fabio Zadrozny <fabiofz@gmail.com> |
| Date | Thu, 13 Nov 2014 11:38:57 -0200 |
| Subject | Re: [Python-Dev] Dinamically set __call__ method |
| To | Gregory Ewing <greg.ewing@canterbury.ac.nz> |
| Content-Type | multipart/alternative; boundary=047d7bb709428629bc0507bda3ec |
| Cc | python list <python-list@python.org> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.15 |
| 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.15774.1415885965.18130.python-list@python.org> (permalink) |
| Lines | 82 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1415885965 news.xs4all.nl 2977 [2001:888:2000:d::a6]:45866 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:80684 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On Thu, Nov 13, 2014 at 2:20 AM, Gregory Ewing <greg.ewing@canterbury.ac.nz> wrote: > Fabio Zadrozny wrote: > >> can someone from python-dev give some background of why that's the way it >> is? >> > > It's because, with new-style classes, a class is also an > instance (of class "type" or a subclass thereof). So > without that rule, it would be ambiguous whether a dunder > method applied to instances of a class or to the class > itself. > > > and if maybe it's something which python-dev would consider worth > >> changing in the future -- not sure how much could break because of that >> though >> > > Something fairly fundamental that would break is classs > instantiation! You instantiate a class by calling it, so if > a(x) were implemented as a.__call__(x), and class C had > a __call__ method, then C() would invoke that method > instead of instantiating C. > > Hi Gregory, Thanks for the explanation -- it still does seem a bit surprising from an end-user point of view, but it does make more sense now :) Best Regards, Fabio
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [Python-Dev] Dinamically set __call__ method Ethan Furman <ethan@stoneleaf.us> - 2014-11-04 11:12 -0800
Re: [Python-Dev] Dinamically set __call__ method John Ladasky <john_ladasky@sbcglobal.net> - 2014-11-06 12:21 -0800
Re: [Python-Dev] Dinamically set __call__ method dieter <dieter@handshake.de> - 2014-11-07 07:59 +0100
Re: [Python-Dev] Dinamically set __call__ method Ethan Furman <ethan@stoneleaf.us> - 2014-11-07 04:58 -0800
Re: [Python-Dev] Dinamically set __call__ method dieter <dieter@handshake.de> - 2014-11-08 07:50 +0100
Re: [Python-Dev] Dinamically set __call__ method Ethan Furman <ethan@stoneleaf.us> - 2014-11-08 11:49 -0800
Re: [Python-Dev] Dinamically set __call__ method Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-11-09 11:31 +1300
Re: [Python-Dev] Dinamically set __call__ method Ethan Furman <ethan@stoneleaf.us> - 2014-11-08 19:27 -0800
Re: [Python-Dev] Dinamically set __call__ method Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-11-10 00:38 +1300
Re: [Python-Dev] Dinamically set __call__ method Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-11-10 00:14 +1100
Re: [Python-Dev] Dinamically set __call__ method Ethan Furman <ethan@stoneleaf.us> - 2014-11-09 12:16 -0800
Re: [Python-Dev] Dinamically set __call__ method Ian Kelly <ian.g.kelly@gmail.com> - 2014-11-11 00:43 -0700
Re: [Python-Dev] Dinamically set __call__ method Fabio Zadrozny <fabiofz@gmail.com> - 2014-11-12 13:33 -0200
Re: [Python-Dev] Dinamically set __call__ method Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-11-13 17:20 +1300
Re: [Python-Dev] Dinamically set __call__ method Fabio Zadrozny <fabiofz@gmail.com> - 2014-11-13 11:38 -0200
Re: [Python-Dev] Dinamically set __call__ method Ian Kelly <ian.g.kelly@gmail.com> - 2014-11-12 11:58 -0700
csiph-web