MCPcopy Create free account
hub / github.com/ZiniuLu/Python-100-Days / __init__

Method __init__

Day01-15/Day08/rect.py:15–18  ·  view source on GitHub ↗

构造器

(self, width=0, height=0)

Source from the content-addressed store, hash-verified

13 """矩形类"""
14
15 def __init__(self, width=0, height=0):
16 """构造器"""
17 self.__width = width
18 self.__height = height
19
20 def perimeter(self):
21 """计算周长"""

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected