E0101

Message

Explicit return in __init__

Description

Used when the special class method __init__() has an explicit return value.

This message belongs to the basic checker.

Explanation

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 return statement with a value other than None. 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