Re: object inheritance

2007-10-31 Thread Gabriel Genellina
En Wed, 31 Oct 2007 19:26:17 -0300, Anand <[EMAIL PROTECTED]> escribió: > On Oct 31, 9:57 am, "Gabriel Genellina" <[EMAIL PROTECTED]> > wrote: >> >> If you know at compile time which features you want, you can use >> multiple >> inheritance to define the new class. >> If you only know the set of

Re: object inheritance

2007-10-31 Thread Anand
On Oct 31, 9:57 am, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Wed, 31 Oct 2007 00:36:34 -0300, Anand <[EMAIL PROTECTED]> escribió: > > >> No, that is an argument for multiple-inheritance, mixin classes etc. You > >> know when constructing the object what behaviour you want it to have. It

Re: object inheritance

2007-10-31 Thread praddy
On Oct 31, 8:26 am, Anand <[EMAIL PROTECTED]> wrote: > On Oct 28, 1:16 am, Pradeep Jindal <[EMAIL PROTECTED]> wrote: > > > > > On Friday 26 Oct 2007 6:21:57 pm Anand wrote: > > > > On Oct 26, 5:31 pm, "Pradeep Jindal" <[EMAIL PROTECTED]> wrote: > > > > Can you tell any specific use case for doing t

Re: object inheritance

2007-10-30 Thread Gabriel Genellina
En Wed, 31 Oct 2007 00:36:34 -0300, Anand <[EMAIL PROTECTED]> escribió: >> No, that is an argument for multiple-inheritance, mixin classes etc. You >> know when constructing the object what behaviour you want it to have. It >> isn't an argument for changing the behaviour of an existing object >> d

Re: object inheritance

2007-10-30 Thread Anand
> No, that is an argument for multiple-inheritance, mixin classes etc. You > know when constructing the object what behaviour you want it to have. It > isn't an argument for changing the behaviour of an existing object > dynamically. Partially true. I don't want to change the behavior of an exit

Re: object inheritance

2007-10-30 Thread Anand
On Oct 28, 1:16 am, Pradeep Jindal <[EMAIL PROTECTED]> wrote: > On Friday 26 Oct 2007 6:21:57 pm Anand wrote: > > > > > On Oct 26, 5:31 pm, "Pradeep Jindal" <[EMAIL PROTECTED]> wrote: > > > Can you tell any specific use case for doing this? > > > I have many implementaions of a db interface. > > >

Re: object inheritance

2007-10-27 Thread Pradeep Jindal
On Friday 26 Oct 2007 6:21:57 pm Anand wrote: > On Oct 26, 5:31 pm, "Pradeep Jindal" <[EMAIL PROTECTED]> wrote: > > Can you tell any specific use case for doing this? > > I have many implementaions of a db interface. > > SimpleDB - simple implementation > BetterDB - optimized implementation > Cache

Re: object inheritance

2007-10-26 Thread Duncan Booth
Anand <[EMAIL PROTECTED]> wrote: > On Oct 26, 5:31 pm, "Pradeep Jindal" <[EMAIL PROTECTED]> wrote: >> Can you tell any specific use case for doing this? > > I have many implementaions of a db interface. > > SimpleDB - simple implementation > BetterDB - optimized implementation > CachedDB - an im

Re: object inheritance

2007-10-26 Thread Anand
On Oct 26, 5:31 pm, "Pradeep Jindal" <[EMAIL PROTECTED]> wrote: > Can you tell any specific use case for doing this? I have many implementaions of a db interface. SimpleDB - simple implementation BetterDB - optimized implementation CachedDB - an implementation with caching of queries RestrictedDB

Re: object inheritance

2007-10-26 Thread Pradeep Jindal
Can you tell any specific use case for doing this? Regards, Pradeep On 10/26/07, Anand <[EMAIL PROTECTED]> wrote: > I am trying to implement some kind of object inheritance. Just like > one class can extend from another, I want to do the same on objects > dynamically. > >

object inheritance

2007-10-26 Thread Anand
I am trying to implement some kind of object inheritance. Just like one class can extend from another, I want to do the same on objects dynamically. I just thought that I can share my excitement here. Suppose there are classes A and B and their instances a and b. class A: def foo(self

Re: object inheritance and default values

2005-10-14 Thread Ron Adam
George Sakkis wrote: > "Ron Adam" <[EMAIL PROTECTED]> wrote: > > >>I'm trying to implement simple svg style colored complex objects in >>tkinter and want to be able to inherit default values from other >>previously defined objects. >> >>I want to something roughly similar to ... >> >>class sh

Re: object inheritance and default values

2005-10-14 Thread Kay Schluehr
George Sakkis wrote: > "Ron Adam" <[EMAIL PROTECTED]> wrote: > > > I'm trying to implement simple svg style colored complex objects in > > tkinter and want to be able to inherit default values from other > > previously defined objects. > > > > I want to something roughly similar to ... > > > >

Re: object inheritance and default values

2005-10-14 Thread George Sakkis
"Ron Adam" <[EMAIL PROTECTED]> wrote: > I'm trying to implement simple svg style colored complex objects in > tkinter and want to be able to inherit default values from other > previously defined objects. > > I want to something roughly similar to ... > > class shape(object): > def __

object inheritance and default values

2005-10-14 Thread Ron Adam
I'm trying to implement simple svg style colored complex objects in tkinter and want to be able to inherit default values from other previously defined objects. I want to something roughly similar to ... class shape(object): def __init__(self, **kwds): # set a bunch