Ronald Oussoren added the comment:

The text appears to be correct as it is. What is says is that __init__ must not 
return any value other than None and that is correct, you will get an exception 
when you return a value that is not None.

>>> class C():
...    def __init__(self): return 42
... 
>>> 
>>> C()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: __init__() should return None, not 'int'
>>> 

The text is basically a language-lawyer way of stating that __init__ should 
return by either running of the end of the method, or by using a bare return 
statement.

----------
nosy: +ronaldoussoren

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26479>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to