Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #109376
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Newsgroups | comp.lang.python |
| Subject | Re: Multiple inheritance, super() and changing signature |
| Date | Thu, 2 Jun 2016 11:55:16 -0600 |
| Lines | 29 |
| Message-ID | <mailman.101.1464890159.1839.python-list@python.org> (permalink) |
| References | <80ea0ea1-5468-2dee-2c38-c2b09801d0f1@shopzeus.com> <85h9de6lp4.fsf@benfinney.id.au> <mailman.58.1464724917.1839.python-list@python.org> <52defc17-a6e6-4f7e-a91d-4e1e3b263b55@googlegroups.com> <57506e90$0$1602$c3e8da3$5496439d@news.astraweb.com> <CALwzidn65R5jaFLmiEdvLJXgij+0GiVXA5oAMM6UnyeneRz8hQ@mail.gmail.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | quoted-printable |
| X-Trace | news.uni-berlin.de 5JWSt7NqfaGmBBePuy2Y9ABNIXlRDU0jjNErCKrGaMxg== |
| Return-Path | <ian.g.kelly@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.001 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'method.': 0.05; 'url:msdn': 0.07; 'wednesday,': 0.07; 'cc:addr:python-list': 0.09; '*is*': 0.09; '__init__': 0.09; 'received:209.85.218': 0.10; 'python': 0.10; 'language,': 0.11; 'thu,': 0.15; '2016': 0.16; 'cc:name:python': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'statement.': 0.16; 'subject:changing': 0.16; 'sugar': 0.16; 'syntactic': 0.16; 'wrote:': 0.16; 'instance,': 0.18; '>>>': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'not,': 0.22; 'lawrence': 0.22; 'am,': 0.23; 'properties': 0.24; 'header:In- Reply-To:1': 0.24; 'example': 0.26; 'equivalent': 0.27; 'message- id:@mail.gmail.com': 0.27; '(although': 0.29; 'python).': 0.29; 'array': 0.29; 'creating': 0.30; 'language.': 0.32; 'class': 0.33; "d'aprano": 0.33; 'int': 0.33; 'steven': 0.33; 'similar': 0.33; 'received:google.com': 0.35; 'instance': 0.35; 'quite': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'url:library': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'setting': 0.37; 'seem': 0.37; 'received:209': 0.38; 'mean': 0.38; 'means': 0.39; 'does': 0.39; 'some': 0.40; 'believe': 0.66; 'skip:\xe2 10': 0.70; '8bit%:43': 0.72; 'url:en-us': 0.72; 'to:none': 0.91 |
| 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:cc :content-transfer-encoding; bh=iiAr1cYvrx1NEd5fLl8UQ1TEc+EJldTOdnGOVV3w2MI=; b=MD5j9NlNJ7bgLp32cO8SB03wfaPi6TRVNF+TZO6WXdKOztcAHQjwsFp6iv3XOs1bfN Qm4YmzIlCeQv3uKDvc67tIfwjQ1bp7xPs2bzPBO2ubcd7Zsc8szLVYwejSn7xoIIADya pXRBUXT0kEP90bwrrYI9cLSR58xd8hy45dIYEcPjniZrL20QobbKlE03qwOLk1l8sYvQ CzXnNCOT0MYnp7XuB6UfKi/87Kkk0en3q0NZJ7degP6K9Fqz8IfQ0EApO/BlL4NHMyrV nYN/Lc5OcqiaTibYrW2PmO6OpfVZEPhCwjuLYgROE3GitORq5Xna8x0nDzHoL1R2HaBX urEg== |
| X-Google-DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:cc:content-transfer-encoding; bh=iiAr1cYvrx1NEd5fLl8UQ1TEc+EJldTOdnGOVV3w2MI=; b=bjTsWFAQwX3JZgRMJLlxTPw0Zq2ZFOpTT7bMb6sbgEW0smn8exHJZzlDk0Yh/vcamO wN4KWaqWpDwkgJarZh21P1b5UM0hywJ7Bhl/WoV7wQFsY8s2pLU7Q+hnnpwV2/mVSVhN BfjFykNJmSUV3sE7bTkaCzSPKpE92SjxCaLJgaYq7DAka6zOnRHjt4Uuw17BfAfAYNFx HHXjLvia0NnTVBap00MQiNyUT9qSxNIpYreH2HgVbFeZmHXL/+PEyxoMeW/rIjETT5+G t8qV1/q5ZSdZRmKQr4UtqOol3YQO2nR2Y3HXzMnS8nYxfGNWlppsrVEwQm9k3jpNJJeH n6TA== |
| X-Gm-Message-State | ALyK8tIEAD1jGTePm2mbZNX/7RT1hZGUPRuqHy8bm/6rqcCK9F7XWhAoJKZQMv1kuHsVJcaNMj5CpCQowz3bvQ== |
| X-Received | by 10.157.37.6 with SMTP id k6mr2630327otb.115.1464890155851; Thu, 02 Jun 2016 10:55:55 -0700 (PDT) |
| In-Reply-To | <57506e90$0$1602$c3e8da3$5496439d@news.astraweb.com> |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.22 |
| 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> |
| X-Mailman-Original-Message-ID | <CALwzidn65R5jaFLmiEdvLJXgij+0GiVXA5oAMM6UnyeneRz8hQ@mail.gmail.com> |
| X-Mailman-Original-References | <80ea0ea1-5468-2dee-2c38-c2b09801d0f1@shopzeus.com> <85h9de6lp4.fsf@benfinney.id.au> <mailman.58.1464724917.1839.python-list@python.org> <52defc17-a6e6-4f7e-a91d-4e1e3b263b55@googlegroups.com> <57506e90$0$1602$c3e8da3$5496439d@news.astraweb.com> |
| Xref | csiph.com comp.lang.python:109376 |
Show key headers only | View raw
On Thu, Jun 2, 2016 at 11:36 AM, Steven D'Aprano <steve@pearwood.info> wrote:
> On Thu, 2 Jun 2016 06:22 pm, Lawrence D’Oliveiro wrote:
>
>> On Wednesday, June 1, 2016 at 8:02:14 AM UTC+12, Ben Finney wrote:
>>> (Note that ‘__init__’ is not a constructor, because it operates on the
>>> *already constructed* instance, and does not return anything.
>>
>> Believe it or not, that *is* what “constructor” means in every OO
>> language.
>
> I don't believe it.
>
> C# is an OO language, and it distinguishes constructors and initialisers:
>
> https://msdn.microsoft.com/en-us/library/bb397680.aspx
>
> (although they don't seem to mean quite the same as what they mean in
> Python).
Indeed. The "constructor" in that example is the equivalent of the
Python __init__ method. The "initializer" is not a part of the class
at all but just a syntactic sugar for creating an instance and setting
some of its properties at the same time in a single statement. It's
very similar to the C array initializer syntax, e.g.:
int myArray[] = {1, 2, 3, 4, 5};
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Multiple inheritance, super() and changing signature Ben Finney <ben+python@benfinney.id.au> - 2016-06-01 06:01 +1000
Re: Multiple inheritance, super() and changing signature Lawrence D’Oliveiro <lawrencedo99@gmail.com> - 2016-06-02 01:22 -0700
Re: Multiple inheritance, super() and changing signature Michael Selik <michael.selik@gmail.com> - 2016-06-02 14:44 +0000
Re: Multiple inheritance, super() and changing signature Steven D'Aprano <steve@pearwood.info> - 2016-06-03 03:36 +1000
Re: Multiple inheritance, super() and changing signature Ian Kelly <ian.g.kelly@gmail.com> - 2016-06-02 11:55 -0600
Re: Multiple inheritance, super() and changing signature Random832 <random832@fastmail.com> - 2016-06-02 17:18 -0400
Re: Multiple inheritance, super() and changing signature Marko Rauhamaa <marko@pacujo.net> - 2016-06-03 01:20 +0300
Re: Multiple inheritance, super() and changing signature Steven D'Aprano <steve@pearwood.info> - 2016-06-03 22:47 +1000
csiph-web