wxPython and macros (was: Why don't people like lisp?

Michele Simionato mis6 at pitt.edu
Mon Oct 27 01:57:24 EST 2003


Kenny Tilton <ktilton at nyc.rr.com> wrote in message news:<_yYmb.9355$Gq.3838698 at twister.nyc.rr.com>...
> Now the million dollar question is: how could the longer version above 
> be cleaned up without macros, with HOFs or a metaclass hack or something?
> 
> kenny

Probably yes. For what concerns automatically calling the base class
__init__ method with a metaclass, see this thread (sorry for the long
URL):

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&threadm=3nfevuomi6bo0f57n9l354ftusjrvis9v6%404ax.com&rnum=1&prev=/groups%3Fhl%3Den%26lr%3D%26ie%3DISO-8859-1%26q%3Dsimionato%2Bautoinit%26btnG%3DGoogle%2BSearch%26meta%3Dgroup%253Dcomp.lang.python.*

It is interesting to notice that I never use this trick since
"explicit
is better than implicit" and I do prefer to call explicitly the
__init__
method. I think it is better for the readers of my classes (including
myself six months from now).

                    Michele




More information about the Python-list mailing list