-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Conversation
There was a problem hiding this 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.
src/libstd_unicode/unicode.py
Outdated
|
||
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): |
There was a problem hiding this comment.
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
src/libstd_unicode/unicode.py
Outdated
@@ -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) |
There was a problem hiding this comment.
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.
Hah. Good points. Fixed both. |
Thanks! @bors r+ rollup |
📌 Commit 261d4d8 has been approved by |
fix some python3 incompatibilities
No description provided.