Implicit initialization is EXCELLENT

Ulrich Eckhardt ulrich.eckhardt at dominolaser.com
Wed Jul 6 08:49:51 CEST 2011


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.

Uli

-- 
Domino Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932




More information about the Python-list mailing list