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: 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: References: <4e132d0f$0$29973$c3e8da3$5496439d@news.astraweb.com> From: Ian Kelly Date: Wed, 6 Jul 2011 10:26:48 -0600 Subject: Re: Implicit initialization is EXCELLENT To: Ulrich Eckhardt 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 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On Wed, Jul 6, 2011 at 12:49 AM, Ulrich Eckhardt wrote: > Mel wrote: >> In wx, many of the window classes have Create methods, for filling in >> various attributes in "two-step construction". =A0I'm not sure why, beca= use >> it works so well to just supply all the details when the class is called >> and an instance is constructed. =A0Maybe 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 fro= m > 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.