Skip to content

Optimize Msg decode - #27

Open
logan059 wants to merge 1 commit into
mchardysam:masterfrom
logan059:fix/Msg-decode
Open

Optimize Msg decode#27
logan059 wants to merge 1 commit into
mchardysam:masterfrom
logan059:fix/Msg-decode

Conversation

@logan059

Copy link
Copy Markdown

Before msg.to_hex_data() is return b'd601233...' ,but now return 'd601233...'

@mchardysam

Copy link
Copy Markdown
Owner

@logan059 you're right that the docstring says hex string and it hands back bytes, so the two don't match.

I haven't taken it as is though, because test_messages.py asserts the expected values as bytes and anyone already calling to_hex_data() will be handling bytes today, so it'd break them without warning. I'd rather do it deliberately with the tests updated and a note in the changelog.

Leaving it open as the thing to fix. Are you decoding it yourself at the call site at the moment, or would a separate method that returns str be more useful to you?

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.

3 participants