Re: preemptive OOP?
- From: Steve Holden <steve@xxxxxxxxxxxxx>
- Date: Thu, 28 Sep 2006 21:04:01 +0100
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
would.
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
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
.
- Follow-Ups:
- Re: preemptive OOP?
- From: John Salerno
- Re: preemptive OOP?
- References:
- preemptive OOP?
- From: John Salerno
- Re: preemptive OOP?
- From: Erik Johnson
- Re: preemptive OOP?
- From: John Salerno
- preemptive OOP?
- Prev by Date: Re: Recursive descent algorithm able to parse Python?
- Next by Date: Re: preemptive OOP?
- Previous by thread: Re: preemptive OOP?
- Next by thread: Re: preemptive OOP?
- Index(es):