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
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1476,7 +1476,7 @@ class MyMetaClass(type):
1476
1476
returntype.__new__(cls, name, parents, attrs)
1477
1477
```
1478
1478
***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.**
1479
-
***It receives the same arguments as init(), except for the first one that specifies the desired class of returned instance (**`MyMetaClass`**in our case).**
1479
+
***It receives the same arguments as init(), except for the first one that specifies the desired class of returned instance (**`MyMetaClass`**in our case).**
1480
1480
***New() can also be called directly, usually from a new() method of a child class (**`def __new__(cls): return super().__new__(cls)`**), in which case init() is not called.**
0 commit comments