From a183651ea679290ea6917e57cab62274a1025887 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jure=20=C5=A0orn?= Date: Sat, 16 Mar 2019 19:17:49 +0100 Subject: [PATCH] New --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 304aa1d..c56b6e9 100644 --- a/README.md +++ b/README.md @@ -1460,6 +1460,8 @@ class MyMetaClass(type): attrs['a'] = 'abcde' return type.__new__(cls, name, parents, attrs) ``` +* **New() is a class method that gets called before init(). It returns an instance of a class that gets passed to init() as a 'self' argument.** +* **It receives the same arguments as init(), except for the first one which is its class.** ### Metaclass Attribute **When class is created it checks if it has metaclass defined. If not, it recursively checks if any of his parents has it defined and eventually comes to type.**