Skip to content

Commit 0b98ca4

Browse files
committed
Merge pull request quantifiedcode#25 from mikulely/master
Fix code example
2 parents 6ee7ea7 + 7a0c6fe commit 0b98ca4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/correctness/explicit_return_in_init.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ There is no reason why the ``Rectangle`` class MUST return the area immediately
4646
self.width = width
4747
self.height = height
4848
self.area = width * height
49-
def area: # moved the logic for returning area to a separate method
49+
50+
@property
51+
def area(): # moved the logic for returning area to a separate method
5052
return self.area
5153
5254
References

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy