From 44c37d5531d42a73b0bde49525e586b413489caf Mon Sep 17 00:00:00 2001 From: Cornel Punga Date: Tue, 24 Mar 2015 19:26:19 +0200 Subject: [PATCH] [python3.html.mardown] Added a short statement about magic methods Terminology related to Python special functions --- python3.html.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/python3.html.markdown b/python3.html.markdown index e8913267..56126ad3 100644 --- a/python3.html.markdown +++ b/python3.html.markdown @@ -498,7 +498,9 @@ class Human(object): # Basic initializer, this is called when this class is instantiated. # Note that the double leading and trailing underscores denote objects # or attributes that are used by python but that live in user-controlled - # namespaces. You should not invent such names on your own. + # namespaces. Methods(or objects or attributes) like: __init__, __str__, + # __repr__ etc. are called magic methods (or sometimes called dunder methods) + # You should not invent such names on your own. def __init__(self, name): # Assign the argument to the instance's name attribute self.name = name