We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6ee7ea7 + 7a0c6fe commit 0b98ca4Copy full SHA for 0b98ca4
docs/correctness/explicit_return_in_init.rst
@@ -46,7 +46,9 @@ There is no reason why the ``Rectangle`` class MUST return the area immediately
46
self.width = width
47
self.height = height
48
self.area = width * height
49
- def area: # moved the logic for returning area to a separate method
+
50
+ @property
51
+ def area(): # moved the logic for returning area to a separate method
52
return self.area
53
54
References
0 commit comments