This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author simeon.visser
Recipients docs@python, ethan.furman, simeon.visser
Date 2014-11-30.20:34:25
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1417379665.32.0.132646352635.issue20467@psf.upfronthosting.co.za>
In-reply-to
Content
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 this in order to "block creation" of the instance (as __new__ is less well-known, I have seen the above attempted on Stack Overflow: http://stackoverflow.com/questions/26896941/proper-way-to-terminate-object-creation-inside-of-init/)
History
Date User Action Args
2014-11-30 20:34:25simeon.vissersetrecipients: + simeon.visser, docs@python, ethan.furman
2014-11-30 20:34:25simeon.vissersetmessageid: <1417379665.32.0.132646352635.issue20467@psf.upfronthosting.co.za>
2014-11-30 20:34:25simeon.visserlinkissue20467 messages
2014-11-30 20:34:25simeon.vissercreate