summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAnkush Aggarwal <ankushagg93@gmail.com>2017-03-28 01:21:18 -0700
committerven <vendethiel@hotmail.fr>2017-03-28 10:21:18 +0200
commit82c3ce4e8c4fc17a30290f87698ca5d25e113312 (patch)
treea55506d637a2734cdaccd58895c2622172eaa012
parentc1d773eab766891c8c9f5820bf18c8fafa6a8d5e (diff)
add underscore to property (#2691)
property is exposed using setter and getters
-rw-r--r--python3.html.markdown2
1 files changed, 1 insertions, 1 deletions
diff --git a/python3.html.markdown b/python3.html.markdown
index 6a2a7ccd..a74ddd7d 100644
--- a/python3.html.markdown
+++ b/python3.html.markdown
@@ -665,7 +665,7 @@ class Human:
self.name = name
# Initialize property
- self.age = 0
+ self._age = 0
# An instance method. All methods take "self" as the first argument
def say(self, msg):