Skip to content

Commit ded49dd

Browse files
authored
Merge pull request yidao620c#274 from zhangjieke/patch-1
根据上下文,__init__中属性名称是 self._first_name 而不是 self.first_name
2 parents 2d96318 + 5fa4da2 commit ded49dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/c08/p06_create_managed_attributes.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
1818
class Person:
1919
def __init__(self, first_name):
20-
self.first_name = first_name
20+
self._first_name = first_name
2121
2222
# Getter function
2323
@property

0 commit comments

Comments
 (0)