2 lsc123987 lsc123987 于 2013.07.05 20:40 提问

python 类在实现了mongoengine后不能被继承是怎么回事?

[20:06:55][5648][INFO ][utils.py:20][]: ============== log initialized ==============
Traceback (most recent call last):
File "D:\ztcjingling\ztcjl3-20120903\apps\kwlib\test.py", line 10, in
from kwlib.task_manage import Task_Manager
File "D:\ztcjingling\ztcjl3-20120903\apps\kwlib\task_manage.py", line 461, in
class Claw_Task(Task_Manager):
File "C:\Python27\lib\site-packages\mongoengine-0.8.1-py2.7.egg\mongoengine\base\metaclasses.py", line 331, in new
new_class = super_new(cls, name, bases, attrs)
File "C:\Python27\lib\site-packages\mongoengine-0.8.1-py2.7.egg\mongoengine\base\metaclasses.py", line 119, in new
base.__name__)
ValueError: Document Task_Manager may not be subclassed

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!