For Kenny Tilton: Why do I need macros revisited.

Michele Simionato mis6 at
Sat Aug 23 09:40:48 CEST 2003

mertz at (David Mertz) wrote in message news:<mailman.1061594769.30646.python-list at>...
> "Andrew Dalke" <adalke at> wrote previously:
> |I've seen David Mertz' xml_pickle code which makes good use of
> |[metaclasses], but don't yet follow how it works.
> I'm afraid I must insist here that the use of metaclasses in
> gnosis.xml.pickle is utterly trivial, and just for show.  You'll
> have to look elsewhere for "good use" of them :-).
> Yours, David...

For instance Psyco was using metaclasses to wrap the methods to
"speed-up", at least when I looked at version 0.4. 
This was a quite clean usage, simple and effective.
When you need to wrap many methods in a class (for instance for
logging purposes or other reasons) a metaclass is most probably 
the best solution you have at your disposal.

Michele Simionato, Ph. D.
MicheleSimionato at
--- Currently looking for a job ---

More information about the Python-list mailing list