preemptive OOP?

Steve Holden steve at
Thu Sep 28 22:04:01 CEST 2006

John Salerno wrote:
> Erik Johnson wrote:
>>    My feeling is that there is no good reason to add the complexity of your
>>own custom classes if they provide no additional data or behaviour. If you
>>know you have plans to add your own attributes and/or methods to MyNotebook
>>soon, there's no harm in doing this now, but why? You can always create your
>>own custom subclass at the point when you have something of value to add and
>>through the mircale of polymorphism, it will function everywhere a Notebook
> I think you're right. In fact, one thing I always loved about Python was 
> that OOP is optional, and here I am trying to force it upon myself 
> unnecessarily! :)

However, if you want to simplify the code, you could start by saying

     myNotebook = wx.Notebook

Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC/Ltd
Skype: holdenweb
Recent Ramblings

More information about the Python-list mailing list