mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 09:41:36 +00:00
[python/en] add hint about leading underscore indicating internal use (#4748)
This commit is contained in:
parent
7b2491ecd5
commit
e9f263a75f
@ -733,7 +733,9 @@ class Human:
|
||||
self.name = name
|
||||
|
||||
# Initialize property
|
||||
self._age = 0
|
||||
self._age = 0 # the leading underscore indicates the "age" property is
|
||||
# intended to be used internally
|
||||
# do not rely on this to be enforced: it's a hint to other devs
|
||||
|
||||
# An instance method. All methods take "self" as the first argument
|
||||
def say(self, msg):
|
||||
|
Loading…
Reference in New Issue
Block a user