Skip to content

Commit 0eda219

Browse files
committed
New
1 parent 03239e5 commit 0eda219

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1460,8 +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(). 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.**
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, unless it is called directly as in example above.**
1464+
* **It receives the same arguments as init(), except for the first one that specifies the desired class of returned instance.**
14651465

14661466
### Metaclass Attribute
14671467
**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)