mertz at gnosis.cx
Sun Aug 24 05:50:58 CEST 2003
Gustavo Niemeyer <niemeyer at conectiva.com> wrote previously:
|Can you imagine any alternative which is not based on the same concept
|(executing the module code on a hacked context)?
In Gnosis Utilities, the function gnosis.magic.import_with_metaclass()
does basically the same thing, but a bit more neatly packaged up. You
might give that a try for imposing metaclasses on older code.
Michele Simionato has proposed some enhancements to resolve issues of
metatype conflicts, but I haven't quite decided to bundle them up in
Gnosis, since that add quite a bit of complication that is not needed
95% of the time. But one day, I suppose I will. However, he has posted
the same general concepts to ActiveState's Python Cookbook; and the
article by my Michele and I that discusses some of this should FINALLY
appear at IBM developerWorks this week (we wrote it quite some months
ago; and it's been available on my website for some of the interim).
Keeping medicines from the bloodstreams of the sick; food from the bellies
of the hungry; books from the hands of the uneducated; technology from the
underdeveloped; and putting advocates of freedom in prisons. Intellectual
property is to the 21st century what the slave trade was to the 16th.
X-Shameless-Plug: Buy Text Processing in Python: http://tinyurl.com/jskh
More information about the Python-list