Re: Find the closest relative

2007-05-25 Thread MRAB
On May 25, 12:08 pm, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote: > En Fri, 25 May 2007 05:09:00 -0300, [EMAIL PROTECTED] > <[EMAIL PROTECTED]> escribió: > > > > > Vehicle > > | > > |--- Two Wheeler > > | | > > | |--- BatteryPowered > > | |--- PetrolPower

Re: Find the closest relative

2007-05-25 Thread Gabriel Genellina
En Fri, 25 May 2007 05:09:00 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió: > Vehicle > | > |--- Two Wheeler > | | > | |--- BatteryPowered > | |--- PetrolPowered > | |--- DieselPowered > | > |--- Three Wheeler > | | >

Re: Find the closest relative

2007-05-25 Thread [EMAIL PROTECTED]
On May 25, 12:40 pm, 7stud <[EMAIL PROTECTED]> wrote: > On May 25, 12:31 am, "[EMAIL PROTECTED]" > > > > <[EMAIL PROTECTED]> wrote: > > This is how I implemented; I guess there must be elegant way to do > > this... > > > def find_closest_relative(a,b,c): > > c1 = b.__class__ > > c2 = b.__cl

Re: Find the closest relative

2007-05-25 Thread [EMAIL PROTECTED]
On May 25, 12:40 pm, 7stud <[EMAIL PROTECTED]> wrote: > On May 25, 12:31 am, "[EMAIL PROTECTED]" > > > > <[EMAIL PROTECTED]> wrote: > > This is how I implemented; I guess there must be elegant way to do > > this... > > > def find_closest_relative(a,b,c): > > c1 = b.__class__ > > c2 = b.__cl

Re: Find the closest relative

2007-05-25 Thread 7stud
On May 25, 12:31 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > This is how I implemented; I guess there must be elegant way to do > this... > > def find_closest_relative(a,b,c): > c1 = b.__class__ > c2 = b.__class__ > > while True: > if isinstance(a, c1): > re