-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PEP 678: del err.__notes__
, and why we're not just using a list
#2360
Conversation
- a new method ``BaseException.add_note(note, *, replace=False)``, | ||
- ``BaseException.__notes__``, a read-only field which is a tuple of zero or | ||
- a new method ``BaseException.add_note(note)``, | ||
- ``BaseException.__notes__``, a read-only attribute which is a tuple of zero or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it still correct to say it’s read-only?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so, since it's not writable or mutable - del
clears it, but that's a pretty complicated and rare caveat to express in a sentence here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
del
clearing it surely makes it mutable? You could say "an attribute exposing a read-only tuple", as conceptually one could argue it is a new tuple every time it is changed.
Equally I think this is quite minor and your intent is clear from the text.
A
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One minor punctuation fix, otherwise LGTM
Co-authored-by: CAM Gerlach <[email protected]>
I think this is read for merge 🙂 |
So you don't want to change the "read-only attribute" part? I never know what the eyes emoji means. |
Oops, yeah. That was "I need to think about this", and having thought I think it's OK as-is. Happy to change it if someone has a suggestion though. |
Sounds good, if you change your mind we can change it later. |
Final (🤞) update to the PEP, before I ask the steering council to consider it 🙂