【发布时间】:2013-04-06 15:59:45
【问题描述】:
class first(object):
def __init__(self, room, speed):
self.position = room
self.speed = 20
direction = random.randint(0,359)
class second(first):
def __init__(self)
self.way = first.direction
self.now = first.self.position
我收到一个错误,如何从另一个类的__init__ 获取变量?
【问题讨论】:
标签: python class variables object function