我已经编写了抽象基类的代码,如何使用另一个类访问子类方法(enviroment\u trees)?有可能吗?你知道吗
from abc import ABCMeta, abstractmethod
class EnvironmentAsset(object):
__metaclass__ = ABCMeta
@abstractmethod
def __init__(self):
print("method1")
class Trap(EnvironmentAsset):
def __init__(self):
super(Trap, self).__init__()
@abstractmethod
def enviorment_trees(age):
print("age",age);
return
目前没有回答
相关问题 更多 >
编程相关推荐