Discuss / Python / 写出来调试通过了,但是还没有理解是怎么回事

写出来调试通过了,但是还没有理解是怎么回事

Topic source

class Screen(object):

    @property

    def width(self):

        return self._width

    @width.setter

    def width(self,v):

        self._width=v

    @property

    def height(self):

        return self._height

    @height.setter

    def height(self,h):

        self._height=h

    @property

    def resolution(self):

        return self._width*self.height


  • 1

Reply