abstract metaclass

R

Roald de Vries

Hi all,

I'm trying to create a metaclass that keeps track of its objects, and
implement this as a collections.MutableMapping. That is, something
like this:


class type2(type, MutableMapping):
...

/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/
python2.6/abc.pyc in __new__(mcls, name, bases, namespace)
83 if getattr(value,
"__isabstractmethod__", False))
84 for base in bases:
---> 85 for name in getattr(base, "__abstractmethods__",
set()):
86 value = getattr(cls, name, None)
87 if getattr(value, "__isabstractmethod__",
False):

TypeError: Error when calling the metaclass bases
'getset_descriptor' object is not iterable


Anybody knows why? Every type is just an object, isn't it?

Thanks in advance, cheers,

Roald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top