bpo-29904: Fix small exception typos in Lib#818
Conversation
|
@DimitrisJim, thanks for your PR! By analyzing the history of the files in this pull request, we identified @freddrake, @ambv and @benjaminp to be potential reviewers. |
serhiy-storchaka
left a comment
There was a problem hiding this comment.
I would approve typo fixes, but the commit contains changes that can't be considered as typos.
There was a problem hiding this comment.
This is not a typo. Open a new PR for this change.
There was a problem hiding this comment.
This isn't a typo. This is just a quoting style.
There was a problem hiding this comment.
It seems like a really odd quotation style, though, it isn't used elsewhere in configparser.py and that's why I considered it a 'typo'. Should I remove it nonetheless?
There was a problem hiding this comment.
It is used in other modules. Yes, remove this change.
There was a problem hiding this comment.
This isn't a typo. And proposed wording is not correct.
|
I addressed the issues you raised @serhiy-storchaka, thanks! Will now create a PR for the other issue. |
| def flush(self): | ||
| if self.closed: | ||
| raise ValueError("flush of closed file") | ||
| raise ValueError("flush on closed file") |
There was a problem hiding this comment.
This is not a typo, it is a wording choice. I don't see the point in changing it, and in fact as a native English speaker I think 'of' reads better here. To use 'on' you'd want to say "flush called on closed file object", which is wordier.
There was a problem hiding this comment.
I considered this a typo mainly due to the wording used on other methods such as tell, truncate, seek (and some other ones). I might not see it but, is there anything special about flush (that doesn't apply to the other methods) that warrants the use of of instead of on?
There was a problem hiding this comment.
Hmm. That's a good point. 'seek on' sounds right, as does 'tell on'. 'truncate on' doesn't. but to make it "right" I'd want it to be 'truncation of', which would lose the method name.
So, upon consideration consistency is better than "better English" in this case. Keep the change.
|
The code coverage failure is obviously unrelated. |
No description provided.