Skip to content

Commit a183651

Browse files
committed
New
1 parent a55e023 commit a183651

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,6 +1460,8 @@ class MyMetaClass(type):
14601460
attrs['a'] = 'abcde'
14611461
return type.__new__(cls, name, parents, attrs)
14621462
```
1463+
* **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.**
1464+
* **It receives the same arguments as init(), except for the first one which is its class.**
14631465

14641466
### Metaclass Attribute
14651467
**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.**

0 commit comments

Comments
 (0)