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


Groups > comp.lang.python > #65174

Re: Dunder [was Re: __init__ is the initialiser]

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python@mrabarnett.plus.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'c++,': 0.07; '__init__': 0.09; 'attributes': 0.09; 'constructor': 0.09; 'subject: [': 0.09; 'trailing': 0.09; 'python': 0.11; 'jan': 0.12; 'called,': 0.16; 'from:addr:mrabarnett.plus.com': 0.16; 'from:addr:python': 0.16; 'from:name:mrab': 0.16; 'message-id:@mrabarnett.plus.com': 0.16; 'pythonistas': 0.16; 'received:192.168.1.4': 0.16; 'roy': 0.16; 'silly': 0.16; 'two,': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'all,': 0.19; "python's": 0.19; '>>>': 0.22; 'memory': 0.22; 'header:User- Agent:1': 0.23; 'sort': 0.25; "i've": 0.25; 'possibly': 0.26; 'header:In-Reply-To:1': 0.27; '[1]': 0.29; 'words': 0.29; 'sets': 0.30; 'too.': 0.31; 'comparison': 0.31; "d'aprano": 0.31; 'steven': 0.31; 'probably': 0.32; 'alone': 0.33; 'fri,': 0.33; 'not.': 0.33; 'subject:the': 0.34; "can't": 0.35; 'but': 0.35; 'really': 0.36; 'c++': 0.36; 'useful': 0.36; 'subject:]': 0.38; 'to:addr:python-list': 0.38; 'rather': 0.38; 'heard': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'save': 0.62; "you've": 0.63; 'smith': 0.68; 'article': 0.77; 'constructed.': 0.84; 'ethan': 0.84; 'furman': 0.84; 'teeth': 0.84; 'saving,': 0.91; 'hand,': 0.93
X-CM-Score 0.00
X-CNFS-Analysis v=2.1 cv=eZmzft0H c=1 sm=1 tr=0 a=0nF1XD0wxitMEM03M9B4ZQ==:117 a=0nF1XD0wxitMEM03M9B4ZQ==:17 a=0Bzu9jTXAAAA:8 a=5FYZ9MsUIQAA:10 a=6O-uv8LcE9kA:10 a=ihvODaAuJD4A:10 a=IkcTkHD0fZMA:10 a=EBOSESyhAAAA:8 a=xZOn7PYu4CkA:10 a=8AHkEIZyAAAA:8 a=Y1c_G1R-U6Gce3gQf9kA:9 a=QEXdDO2ut3YA:10 a=VhVvL8HfBcoA:10 a=ExiFL-q3zkAA:10
X-AUTH mrabarnett:2500
Date Sat, 01 Feb 2014 03:04:11 +0000
From MRAB <python@mrabarnett.plus.com>
User-Agent Mozilla/5.0 (Windows NT 6.3; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
MIME-Version 1.0
To python-list@python.org
Subject Re: Dunder [was Re: __init__ is the initialiser]
References <lcgtpf$tui$1@ger.gmane.org> <lcgut2$b8r$1@ger.gmane.org> <858utviwgs.fsf@benfinney.id.au> <lchce7$44q$1@ger.gmane.org> <mailman.6233.1391214984.18130.python-list@python.org> <roy-EDB0E1.20104631012014@news.panix.com> <52ec6183$0$29972$c3e8da3$5496439d@news.astraweb.com>
In-Reply-To <52ec6183$0$29972$c3e8da3$5496439d@news.astraweb.com>
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 7bit
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.6250.1391223851.18130.python-list@python.org> (permalink)
Lines 39
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1391223851 news.xs4all.nl 2873 [2001:888:2000:d::a6]:33463
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:65174

Show key headers only | View raw


On 2014-02-01 02:52, Steven D'Aprano wrote:
> On Fri, 31 Jan 2014 20:10:46 -0500, Roy Smith wrote:
>
>> In article <mailman.6233.1391214984.18130.python-list@python.org>,
>>  Ethan Furman <ethan@stoneleaf.us> wrote:
>>
>>> I found calling __init__ the constructor very confusing.
>>
>> I've heard many people say this, and it's always sort of befuddled me.
>>
>> In C++, a constructor is really an initializer too.  By the time C++'s
>> Foo::Foo() or Python's Foo.__init__() get called, memory has already
>> been allocated, so I would say the object has been constructed.  Yet,
>> C++ people are perfectly happy calling this "thing that takes some
>> allocated hunk of memory and sets its attributes to useful values" a
>> constructor[1], and Python people are not.
>>
>> [1] Well, they really call it a ctor, but I chalk that up to the same
>> sort of silliness that makes pythonistas pronounce "__" as "dunder" :-)
>
>
> I see your smiley, but the comparison is ridiculous.
>
> "Constructor" is three syllables; "ctor" isn't readily pronounceable in
> English at all, rather like Cthulhu. (I can't think of any standard
> English words with a "CT" in them at all, let alone at the start of the
> word). The best I can come up with is "KUH TOR" or possibly "SEE TOR",
> both of which are clumsy, and only save a single syllable.
>
So you've never used the word "ctenoid"? How strange! :-)

(adj. - Resembling a comb; having projections like the teeth of a comb.)

> On the other hand, "double leading and trailing underscore" is ten
> syllables. "Dunder" is two, a significant saving, and it's a readily
> pronounceable word in English (and probably Dutch). There's nothing silly
> about abbreviating "double leading and trailing underscore" as dunder.
>

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


Thread

Re: __init__ is the initialiser Ethan Furman <ethan@stoneleaf.us> - 2014-01-31 16:13 -0800
  Re: __init__ is the initialiser Roy Smith <roy@panix.com> - 2014-01-31 20:10 -0500
    Re: __init__ is the initialiser MRAB <python@mrabarnett.plus.com> - 2014-02-01 01:41 +0000
      Re: __init__ is the initialiser Roy Smith <roy@panix.com> - 2014-01-31 20:53 -0500
    Re: __init__ is the initialiser Ethan Furman <ethan@stoneleaf.us> - 2014-01-31 18:35 -0800
    Dunder [was Re: __init__ is the initialiser] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-02-01 02:52 +0000
      Re: Dunder [was Re: __init__ is the initialiser] MRAB <python@mrabarnett.plus.com> - 2014-02-01 03:04 +0000
      Re: Dunder [was Re: __init__ is the initialiser] Chris Angelico <rosuav@gmail.com> - 2014-02-01 15:05 +1100
        Re: Dunder [was Re: __init__ is the initialiser] Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-02-01 05:53 +0000

csiph-web