Metaclasses vs. standard Python reflection?

David Mertz mertz at gnosis.cx
Tue May 6 15:40:37 EDT 2003


Pedro Rodriguez <pedro_rodriguez at club-internet.fr> wrote previously:
|I disagree with you when you say that you don't touch the actual code of
|the class, since you have to introduce the 'metaclass' inside the class
|definition (or at last at module level of the class definition).

Nope.  See our article:

    http://www-106.ibm.com/developerworks/linux/library/l-pymeta.html

In particular, look at the function import_with_metaclass(), which is
one of the little utility functions included in gnosis.magic (in Gnosis
Utilities).

--
mertz@  | The specter of free information is haunting the `Net!  All the
gnosis  | powers of IP- and crypto-tyranny have entered into an unholy
.cx     | alliance...ideas have nothing to lose but their chains.  Unite
        | against "intellectual property" and anti-privacy regimes!
-------------------------------------------------------------------------






More information about the Python-list mailing list