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 scoder
Recipients eli.bendersky, scoder, serhiy.storchaka
Date 2020-02-05.08:53:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1580892791.13.0.0132102576205.issue39538@roundup.psfhosted.org>
In-reply-to
Content
I agree that SystemError is the wrong response. Whether it needs to be AttributeError – probably fine to consider this an implementation detail. TypeError also seems ok in at least some of the cases. I think we should widen the code to expect some kind of Mapping (instead of strictly a dict), and if we don't find that on access, a TypeError seems just as good as an AttributeError from Python.

I'm unsure if we should restrict assignments to ".attrib". It's probably enough to allow "None" assignments to say "no attributes allowed", Everything else can be handled by some kind of Mapping object. But then, why not just use the Mapping protocol on access and leave errors to that stage?
History
Date User Action Args
2020-02-05 08:53:11scodersetrecipients: + scoder, eli.bendersky, serhiy.storchaka
2020-02-05 08:53:11scodersetmessageid: <1580892791.13.0.0132102576205.issue39538@roundup.psfhosted.org>
2020-02-05 08:53:11scoderlinkissue39538 messages
2020-02-05 08:53:11scodercreate