Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #65174
| Date | 2014-02-01 03:04 +0000 |
|---|---|
| From | MRAB <python@mrabarnett.plus.com> |
| Subject | Re: Dunder [was Re: __init__ is the initialiser] |
| References | (2 earlier) <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> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.6250.1391223851.18130.python-list@python.org> (permalink) |
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 | Next — Previous in thread | Next in thread | Find similar | Unroll 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