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

fix some python3 incompatibilities #46044

Merged
merged 1 commit into from
Nov 18, 2017
Merged

Conversation

collinanderson
Copy link
Contributor

No description provided.

Copy link
Member

@kennytm kennytm left a comment

Choose a reason for hiding this comment

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

LGTM. Just some nits.


canon_comp = {}
comp_exclusions = norm_props["Full_Composition_Exclusion"]
for char in canon_keys:
if True in map(lambda (lo, hi): lo <= char <= hi, comp_exclusions):
if True in map(lambda lo_hi: lo_hi[0] <= char <= lo_hi[1], comp_exclusions):
Copy link
Member

@kennytm kennytm Nov 16, 2017

Choose a reason for hiding this comment

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

Maybe refactor this to?

if any(lo <= char <= hi for lo, hi in comp_exclusions):
    continue

@@ -446,14 +446,14 @@ def emit_bool_trie(f, name, t_data, is_pub=True):
f.write(" };\n\n")

def emit_small_bool_trie(f, name, t_data, is_pub=True):
last_chunk = max(int(hi / 64) for (lo, hi) in t_data)
last_chunk = max(int(hi // 64) for (lo, hi) in t_data)
Copy link
Member

Choose a reason for hiding this comment

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

Will we ever get non-integer from the source code? All the int() calls could be dropped in not.

@kennytm kennytm added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 16, 2017
@collinanderson
Copy link
Contributor Author

Hah. Good points. Fixed both.

@kennytm
Copy link
Member

kennytm commented Nov 16, 2017

Thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Nov 16, 2017

📌 Commit 261d4d8 has been approved by kennytm

@kennytm kennytm added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 16, 2017
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Nov 18, 2017
bors added a commit that referenced this pull request Nov 18, 2017
Rollup of 4 pull requests

- Successful merges: #45767, #46044, #46066, #46071
- Failed merges:
@bors bors merged commit 261d4d8 into rust-lang:master Nov 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants