diff options
author | triumphantomato <91909240+triumphantomato@users.noreply.github.com> | 2023-09-07 22:30:31 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-08 13:30:31 +0800 |
commit | e9f263a75f0ec9c2984307d0fd4503f8476c02fa (patch) | |
tree | 9d742657fa801c234ae07ee2ece77c367fb502a0 | |
parent | 7b2491ecd5b3370b7cc712fced32b948440ecb40 (diff) |
[python/en] add hint about leading underscore indicating internal use (#4748)
-rw-r--r-- | python.html.markdown | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/python.html.markdown b/python.html.markdown index 91a53360..efeb0e86 100644 --- a/python.html.markdown +++ b/python.html.markdown @@ -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): |