Python继承E

2024-04-20 13:20:01 发布

您现在位置:Python中文网/ 问答频道 /正文

我正试着印刷自组织行具有显示功能。然而,错误表明没有这样的错误自组织行属性,当它明显位于类成员中时。你知道吗

有人能解释一下我做错了什么吗?你知道吗

谢谢。你知道吗

from Grid import Grid

class Matrix(Grid):
    def _init__(self, m, n, value=None):
        Grid.__init__(m, n)
        self.row = m
        self.col = n
    def display(self):
        print self.row

Tags: fromimportself功能none属性initvalue