8000 Packer accepts bytearray objects by jfolz · Pull Request #229 · msgpack/msgpack-python · GitHub
[go: up one dir, main page]

Skip to content

Packer accepts bytearray objects #229

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

Merged
merged 1 commit into from
May 18, 2017
Merged

Conversation

jfolz
Copy link
Contributor
@jfolz jfolz commented May 17, 2017

Fixes #224.

@jfolz jfolz force-pushed the feature/bytearray branch from 9fbeaf6 to 1b463f8 Compare May 17, 2017 10:14
@jfolz
Copy link
Contributor Author
jfolz commented May 17, 2017

Tiny niggle: It now says "Str is too large" instead of "Bytes is too large" in 2.7 if the object exceeds ITEM_LIMIT.

L = len(o)
if L > ITEM_LIMIT:
raise PackValueError("bytes is too large")
raise PackValueError("%s is too large"
% type(o).__name__.capitalize())
Copy link
Member

Choose a reason for hiding this comment

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

I don't like capitalize().
How about "%s length is too large" % type(o).__name__?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No problem. capitalize is just there because it said Bytes instead of bytes ;)

@jfolz jfolz force-pushed the feature/bytearray branch from 05e6be9 to 34bdb34 Compare May 18, 2017 10:24
@methane methane merged commit f0f2c0b into msgpack:master May 18, 2017
@methane
Copy link
Member
methane commented May 18, 2017

thanks.

@jfolz jfolz deleted the feature/bytearray branch May 18, 2017 14:34
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.

2 participants
0