Skip to content

byte.decode #1193

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
Aug 1, 2019
Merged

byte.decode #1193

merged 1 commit into from
Aug 1, 2019

Conversation

yanganto
Copy link
Contributor

  • support ascii, utf-8 encoding

@yanganto yanganto force-pushed the feat/byte-decode branch 2 times, most recently from 9d6c4fa to 2f4613b Compare July 31, 2019 16:16
Copy link
Member

@coolreader18 coolreader18 left a comment

Choose a reason for hiding this comment

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

Looks good, I left a comment and the clippy build is failing, but address those and I'll merge.

// utf-8 is default encoding
_ => {
let mut p: u32 = 0u32;
let mut remaining_bytes = 0;
Copy link
Member

Choose a reason for hiding this comment

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

utf-8 is the default, but cpython throws a LookupError if you give it an invalid encoding.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Got it, I will implement this.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done :)

@yanganto yanganto changed the title byte.decode [WIP] byte.decode Aug 1, 2019
- support ascii, utf-8 encoding
- raise LookupError for unhandled encoding
@yanganto yanganto changed the title [WIP] byte.decode byte.decode Aug 1, 2019
@coolreader18 coolreader18 merged commit 6d285a7 into RustPython:master Aug 1, 2019
@yanganto
Copy link
Contributor Author

yanganto commented Aug 2, 2019

@coolreader18 thanks for your review.

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