You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1460,8 +1460,8 @@ class MyMetaClass(type):
1460
1460
attrs['a'] ='abcde'
1461
1461
returntype.__new__(cls, name, parents, attrs)
1462
1462
```
1463
-
***New() is a class method that gets called before init(). If it returns an instance of a class, then that instance gets passed to init() as a 'self' argument.**
1464
-
***It receives the same arguments as init(), except for the first one which is a class.**
1463
+
***New() is a class method that gets called before init(). If it returns an instance of its class, then that instance gets passed to init() as a 'self' argument.**
1464
+
***It receives the same arguments as init(), except for the first one that specifies the class of returned instance.**
1465
1465
1466
1466
### Metaclass Attribute
1467
1467
**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