[Sugar-devel] Status of 3G backport to 0.84

Bernie Innocenti bernie at codewiz.org
Wed Mar 10 15:25:28 EST 2010


On Wed, 2010-03-10 at 08:17 +0100, Tomeu Vizoso wrote:
> > We had trouble getting the code backported to 0.84 to work until we
> > finally figured out that GsmPalette.set_status() was overriding a method
> > with the same name in its superclass. An unfortunate naming clash.
> 
> These situations suck, any ideas about how to avoid this?

Normally we'd make private methods prefixed with an _, but this
set_status() had to be called from outside.

It's kind of a language design bug that you could implicitly override
things without noticing. Other OOP languages such as Java and C++ share
the same problem, but one would expect Python to apply the "explicit is
better than implicit" mantra.

Anyway, we worked it around by renaming our function to
set_gsm_status().


> Great news! Congratulations to all involved, it's a beautiful example
> of the Paraguay and Uruguay communities working together with the
> global community. Pity that the patch from Ceibal Jam's Andres didn't
> got in yet, maybe it will get backported later?
> 
> https://bugs.sugarlabs.org/ticket/1630

Seems like a very useful addition, we'll look into it.

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs       - http://sugarlabs.org/



More information about the Sugar-devel mailing list