Skip to content

bpo-29904: Fix small exception typos in Lib#818

Merged
ambv merged 1 commit into
python:masterfrom
DimitrisJim:fix_err_message_typos
Mar 26, 2017
Merged

bpo-29904: Fix small exception typos in Lib#818
ambv merged 1 commit into
python:masterfrom
DimitrisJim:fix_err_message_typos

Conversation

@DimitrisJim

Copy link
Copy Markdown
Contributor

No description provided.

@mention-bot

Copy link
Copy Markdown

@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 serhiy-storchaka left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would approve typo fixes, but the commit contains changes that can't be considered as typos.

Comment thread Lib/asynchat.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a typo. Open a new PR for this change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will do!

Comment thread Lib/configparser.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a typo. This is just a quoting style.

@DimitrisJim DimitrisJim Mar 25, 2017

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is used in other modules. Yes, remove this change.

Comment thread Lib/http/cookiejar.py Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't a typo. And proposed wording is not correct.

@DimitrisJim

Copy link
Copy Markdown
Contributor Author

I addressed the issues you raised @serhiy-storchaka, thanks! Will now create a PR for the other issue.

Comment thread Lib/_pyio.py
def flush(self):
if self.closed:
raise ValueError("flush of closed file")
raise ValueError("flush on closed file")

@bitdancer bitdancer Mar 25, 2017

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@DimitrisJim DimitrisJim Mar 25, 2017

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ambv
ambv merged commit 1e73dbb into python:master Mar 26, 2017
@ambv

ambv commented Mar 26, 2017

Copy link
Copy Markdown
Contributor

The code coverage failure is obviously unrelated.

@DimitrisJim
DimitrisJim deleted the fix_err_message_typos branch March 27, 2017 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants