FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

byte.decode by yanganto · Pull Request #1193 · RustPython/RustPython · GitHub

Repository navigation

byte.decode - #1193

Merged
coolreader18 merged 1 commit into
RustPython:masterfrom
yanganto:feat/byte-decode
Aug 1, 2019
Merged

coolreader18 merged 1 commit into
RustPython:masterfrom
yanganto:feat/byte-decode

Conversation

Copy link
Copy Markdown
Contributor
  • support ascii, utf-8 encoding

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

coolreader18 left a comment

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Comment thread vm/src/obj/objbytes.rs
// utf-8 is default encoding
_ => {
let mut p: u32 = 0u32;
let mut remaining_bytes = 0;

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Got it, I will implement this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Done :)

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

yanganto commented Aug 2, 2019

Copy link
Copy Markdown
Contributor Author

@coolreader18 thanks for your review.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL