Roundup Robot added the comment:
New changeset 7972b18b6e42 by Ethan Furman in branch '2.7':
Issue20467: clarify __init__'s role
https://hg.python.org/cpython/rev/7972b18b6e42
--
___
Python tracker rep...@bugs.python.org
Ethan Furman added the comment:
Changed 'no value may be returned' to 'no non-None value may be returned'.
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
Roundup Robot added the comment:
New changeset 94696e457461 by Ethan Furman in branch '3.3':
Issue20467: clarify __init__'s role
https://hg.python.org/cpython/rev/94696e457461
New changeset 46c9b34f31b8 by Ethan Furman in branch '3.4':
Issue20467: clarify __init__'s role
Simeon Visser added the comment:
Is it worth clarifying that __init__ can return a value but only the value
None? The following won't raise a TypeError:
class O(object):
def __init__(self):
return None
Admittedly the return None is the default behaviour but people may attempt
Ethan Furman added the comment:
Thoughts?
--
keywords: +patch
stage: - patch review
versions: +Python 3.5
Added file: http://bugs.python.org/file37255/issue20467.stoneleaf.01.patch
___
Python tracker rep...@bugs.python.org
Changes by Mark Lawrence breamore...@yahoo.co.uk:
--
nosy: -BreamoreBoy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20467
___
___
New submission from Mark Lawrence:
I found the wording here
http://docs.python.org/3/reference/datamodel.html#object.__init__ very
confusing as it implies that __init__ is the class constructor and not the
initialiser. Specifically it says As a special constraint on constructors, no
value
Changes by Ethan Furman et...@stoneleaf.us:
--
nosy: +ethan.furman
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20467
___
___
Python-bugs-list