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


Groups > comp.lang.python > #8953

Re: Implicit initialization is EXCELLENT

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
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.005
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'attributes': 0.05; 'instance': 0.05; 'see:': 0.07; 'exceptions,': 0.09; 'through.': 0.09; 'c++': 0.12; 'wed,': 0.12; 'am,': 0.13; 'wrote:': 0.15; 'eckhardt': 0.16; 'methods,': 0.16; '\xa0maybe': 0.16; 'cc:addr :python-list': 0.16; 'looked': 0.16; "haven't": 0.21; 'cc:2**0': 0.21; 'cc:no real name:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'code': 0.24; 'there.': 0.25; 'url:wiki': 0.25; 'message- id:@mail.gmail.com': 0.28; 'cc:addr:python.org': 0.30; 'classes': 0.30; 'class': 0.31; 'typically': 0.33; 'rather': 0.33; 'e.g.': 0.34; 'some': 0.37; 'received:google.com': 0.38; 'received:209.85.161': 0.38; 'received:209.85': 0.38; 'url:org': 0.38; 'subject:: ': 0.38; 'signal': 0.38; "there's": 0.39; 'received:209': 0.40; 'called': 0.40; 'details': 0.65; 'supply': 0.69; 'strategy': 0.71; 'failure': 0.73; 'constructed.': 0.84; "\xa0i'm": 0.84
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=uP2V4/cMU/zkLZ0+XyJ14mfvm7RhFlRBxSPev1Lhoh0=; b=NiIMHY/QhB6iSVeHLqCqWabvzoUyT0eCEe2XKxTJoaPrs+rYCVPZzs3c5SZlX8CPt1 BSeElYG/EOR9ZZm+Ha5d8I+NUe8vWbiVSpRU/yLVYOJnwy019hHXc7XAvUlyaph7KCHw DHewmAc+76eZ4s8B3BO6+YTThM3Ba/aXxM2ME=
MIME-Version 1.0
In-Reply-To <rscde8-p6n.ln1@satorlaser.homedns.org>
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 Wed, 6 Jul 2011 10:26:48 -0600
Subject Re: Implicit initialization is EXCELLENT
To Ulrich Eckhardt <ulrich.eckhardt@dominolaser.com>
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding quoted-printable
Cc python-list@python.org
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.705.1309969639.1164.python-list@python.org> (permalink)
Lines 22
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1309969639 news.xs4all.nl 21865 [2001:888:2000:d::a6]:56552
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:8953

Show key headers only | 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