Is a Borg rebellion possible? (a metaclass question)

Carsten Haese carsten at uniqsys.com
Fri Sep 7 21:12:23 EDT 2007


On Fri, 2007-09-07 at 14:54 -0600, Steven Bethard wrote:
> Carsten Haese wrote:
> > [slightly convoluted example...]
> 
> I think I would probably write that as::
> [concise example...]
> 
> That is, I don't think there's really a need for __new__ if you're using 
> a metaclass. Just set the instance's __dict__ in the __call__ method of 
> the metaclass.

Good point. I suppose it shows that this is the first metaclass I've
ever written, but it works, and it didn't make my brain explode ;)

-- 
Carsten Haese
http://informixdb.sourceforge.net





More information about the Python-list mailing list