Closed dejanbatanjac closed 4 years ago
Recent Python compilers ( I checked Python 2.7, as well 3.6, and 3.7) will throw the specific error on explicit return other than None.
None
You can check this with code like this
class C: def __init__(self): return 1 ci=C() #TypeError: __init__() should return None, not 'int'
Recent Python compilers ( I checked Python 2.7, as well 3.6, and 3.7) will throw the specific error on explicit return other than
None
.You can check this with code like this