__init__ method is a generator


Used when the special class method __init__() is turned into a generator by a yield statement in its body.

This message belongs to the basic checker.


The __init__() method is required to return nothing. Python 2.7 and 3.x raises:

TypeError: __init__() should return None

when __init__() is called and executes a yield statement. PyLint reports this error without depending on the actual invocation.

Add a New Comment
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License