Gabriel Genellina wrote:
En Fri, 13 Mar 2009 17:12:49 -0200, alex goretoy <aleksandr.gore...@gmail.com> escribió:

wow, ok, thank you Gabriel, I wasn't aware of x,'y',z

This is what I decided to go with for now in one of my classes, but another
class will need a modified version of this, as mentioned x,'y',z

        B=_brush()

list( ( self.__setattr__(x.replace("b_",""),getattr(B,x)) for x in
dir(B) if x.startswith("b_") ) )

__special__ methods are an implementation detail that you should not use explicitely; instead of obj.__setattr__(name, value) use setattr(obj, name, value).

Except if you want to override the special methods like in operator overloading.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to