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 moi90
Recipients andrei.avk, iritkatriel, jbw, kj, moi90, serhiy.storchaka
Date 2021-10-25.07:41:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635147712.77.0.796750414608.issue43656@roundup.psfhosted.org>
In-reply-to
Content
> Can we determine if they came from an initialized object or from object in the middle of initialization?

That would be very nice because inside __init__ is the only place where we have to deal with partly initialized objects. But I think Python does not provide a way to detect this state.

Although I would very much like having FrameSummary robust to any kind error, I acknowledge that this might not be possible.

It might be frustrating for beginners, but I think the only way to "fix" this, is by having people implement their `repr`s correctly.

The documentation currently says[1]:

> This is typically used for debugging, so it is important that the representation is information-rich and unambiguous.

It should be added that __repr__ might be used to display partly initialized objects during debugging and therefore should deal with these gracefully.

[1] https://docs.python.org/3/reference/datamodel.html#object.__repr__
History
Date User Action Args
2021-10-25 07:41:52moi90setrecipients: + moi90, serhiy.storchaka, iritkatriel, kj, andrei.avk, jbw
2021-10-25 07:41:52moi90setmessageid: <1635147712.77.0.796750414608.issue43656@roundup.psfhosted.org>
2021-10-25 07:41:52moi90linkissue43656 messages
2021-10-25 07:41:52moi90create