Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-29116: Fix error messages for concatenating bytes and bytearray w…#709

Merged
serhiy-storchaka merged 1 commit into
python:masterpython/cpython:masterfrom
serhiy-storchaka:bytes-concat-error-msgserhiy-storchaka/cpython:bytes-concat-error-msgCopy head branch name to clipboard
Mar 19, 2017
Merged

bpo-29116: Fix error messages for concatenating bytes and bytearray w…#709
serhiy-storchaka merged 1 commit into
python:masterpython/cpython:masterfrom
serhiy-storchaka:bytes-concat-error-msgserhiy-storchaka/cpython:bytes-concat-error-msgCopy head branch name to clipboard

Conversation

@serhiy-storchaka

Copy link
Copy Markdown
Member

…ith unsupported type.

@mention-bot

Copy link
Copy Markdown

@serhiy-storchaka, thanks for your PR! By analyzing the history of the files in this pull request, we identified @tiran, @loewis and @benjaminp to be potential reviewers.

Comment thread Objects/bytesobject.c
PyObject_GetBuffer(b, &vb, PyBUF_SIMPLE) != 0) {
PyErr_Format(PyExc_TypeError, "can't concat %.100s to %.100s",
Py_TYPE(a)->tp_name, Py_TYPE(b)->tp_name);
Py_TYPE(b)->tp_name, Py_TYPE(a)->tp_name);

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 think it would be clearer to use "concatenate" instead of "concat" here and above. (Also other errors of similar kind use the full word.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I'll do this in separate PR, because this is larger change that shouldn't be backported. The same error message is generated in yet one place (with correct order of arguments). Maybe will make the message being more similar to other concatenate messages.

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.

@serhiy-storchaka serhiy-storchaka merged commit 6b5a9ec into python:master Mar 19, 2017
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Mar 19, 2017
serhiy-storchaka added a commit to serhiy-storchaka/cpython that referenced this pull request Mar 19, 2017
@serhiy-storchaka serhiy-storchaka deleted the bytes-concat-error-msg branch March 19, 2017 18:19
serhiy-storchaka added a commit that referenced this pull request Mar 19, 2017
…ith unsupported type. (#709) (#723)

(cherry picked from commit 6b5a9ec)
serhiy-storchaka added a commit that referenced this pull request Mar 19, 2017
…ith unsupported type. (#709) (#724)

(cherry picked from commit 6b5a9ec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type-bug An unexpected behavior, bug, or error

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.