Re: Trying to get ABC to work

2009-08-04 Thread Roman
Following code works, although I'm not sure that it's exactly what you want: import abc class MetaExample(abc.ABCMeta): def __new__(mcs, name, bases, ns): ns['cls_meth'] = mcs.cls_meth if not 'cls_abc' in ns: ns['cls_abc'] = mcs.cls_abc

Trying to get ABC to work

2009-08-03 Thread Boris Arloff
Hi,   Looking for ideas on getting Abstract Base Classes to work as intended within a metaclass.   I was wondering if I could use an abc method within a metaclass to force a reimplementation when a class is instantiated from the metaclass.  It seems like I cannot do so.  I implemented the follow