Skip to content
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

bpo-30249: Improve struct.unpack_from() error messages #6059

Merged
merged 2 commits into from
Mar 10, 2018

Conversation

zhangyangyu
Copy link
Member

@zhangyangyu zhangyangyu commented Mar 10, 2018

if (offset < 0) {
if (offset + self->s_size > 0) {
PyErr_Format(StructError,
"no space to unpack %zd bytes at offset %zd",
Copy link
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 better sound as "not enough data" or like.

Copy link
Member Author

Choose a reason for hiding this comment

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

lol. That's my first draft.

@zhangyangyu zhangyangyu merged commit c10b288 into python:master Mar 10, 2018
@zhangyangyu zhangyangyu deleted the issue30249 branch March 10, 2018 18:58
jo2y pushed a commit to jo2y/cpython that referenced this pull request Mar 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-feature A feature request or enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants