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


Groups > comp.lang.python > #8953

Re: Implicit initialization is EXCELLENT

References <4e132d0f$0$29973$c3e8da3$5496439d@news.astraweb.com> <iuvoj9$erb$1@speranza.aioe.org> <rscde8-p6n.ln1@satorlaser.homedns.org>
From Ian Kelly <ian.g.kelly@gmail.com>
Date 2011-07-06 10:26 -0600
Subject Re: Implicit initialization is EXCELLENT
Newsgroups comp.lang.python
Message-ID <mailman.705.1309969639.1164.python-list@python.org> (permalink)

Show all headers | View raw


On Wed, Jul 6, 2011 at 12:49 AM, Ulrich Eckhardt
<ulrich.eckhardt@dominolaser.com> wrote:
> Mel wrote:
>> In wx, many of the window classes have Create methods, for filling in
>> various attributes in "two-step construction".  I'm not sure why, because
>> it works so well to just supply all the details when the class is called
>> and an instance is constructed.  Maybe there's some C++ strategy that's
>> being supported there.
>
> Just guessing, is it legacy, C-with-classes code rather than C++ code
> perhaps? Haven't looked at wx for a while. Such code typically lacks
> understanding of exceptions, which are the only way to signal failure from
> e.g. constructors.

No, wx is C++ through and through.  For the why of it, see:

http://wiki.wxpython.org/TwoStageCreation

The "More Details" section is particularly illuminating.

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


Thread

Implicit initialization is EXCELLENT Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-06 01:26 +1000
  Re: Implicit initialization is EXCELLENT "Michel Claveau - MVP"<enleverLesX_XXmcX@XmclavXeauX.com.invalid> - 2011-07-05 21:04 +0200
  Re: Implicit initialization is EXCELLENT Mel <mwilson@the-wire.com> - 2011-07-05 15:27 -0400
    Re: Implicit initialization is EXCELLENT Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2011-07-06 08:49 +0200
      Re: Implicit initialization is EXCELLENT Ian Kelly <ian.g.kelly@gmail.com> - 2011-07-06 10:26 -0600
        Re: Implicit initialization is EXCELLENT Mel <mwilson@the-wire.com> - 2011-07-06 12:36 -0400
        Re: Implicit initialization is EXCELLENT Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2011-07-07 09:12 +0200
          Re: Implicit initialization is EXCELLENT Ian Kelly <ian.g.kelly@gmail.com> - 2011-07-07 09:58 -0600
  Re: Implicit initialization is EXCELLENT Stefaan Himpe <stefaan.himpe@gmail.com> - 2011-07-05 21:31 +0200
    Re: Implicit initialization is EXCELLENT John Gordon <gordon@panix.com> - 2011-07-05 21:02 +0000
      Re: Implicit initialization is EXCELLENT John Gordon <gordon@panix.com> - 2011-07-05 21:58 +0000
    Re: Implicit initialization is EXCELLENT Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-06 21:44 +1000
      Re: Implicit initialization is EXCELLENT Stefaan Himpe <stefaan.himpe@gmail.com> - 2011-07-06 14:44 +0200
        Re: Implicit initialization is EXCELLENT Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-07 09:40 +1000
  Re: Implicit initialization is EXCELLENT rantingrick <rantingrick@gmail.com> - 2011-07-05 18:53 -0700
    Re: Implicit initialization is EXCELLENT Chris Angelico <rosuav@gmail.com> - 2011-07-06 12:44 +1000
      Re: Implicit initialization is EXCELLENT rantingrick <rantingrick@gmail.com> - 2011-07-05 20:45 -0700
        Re: Implicit initialization is EXCELLENT Chris Angelico <rosuav@gmail.com> - 2011-07-06 13:54 +1000
    Re: Implicit initialization is EXCELLENT Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com> - 2011-07-06 08:45 +0200

csiph-web