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

Comparison of character and integer #91595

Closed
sweetStreet opened this issue Apr 16, 2022 · 3 comments
Closed

Comparison of character and integer #91595

sweetStreet opened this issue Apr 16, 2022 · 3 comments
Assignees
Labels
type-bug

Comments

@sweetStreet
Copy link
Contributor

@sweetStreet sweetStreet commented Apr 16, 2022

Bug report
"ch == 0x7F" seems to be incorrect, use "ord(ch) == 0x7F" instead

elif ch < ' ' or ch == 0x7F:

Your environment

  • CPython versions tested on: 3.7.10
  • Operating system and architecture: Linux x86-64
@sweetStreet sweetStreet added the type-bug label Apr 16, 2022
@ezio-melotti
Copy link
Member

@ezio-melotti ezio-melotti commented Apr 16, 2022

Thanks for the report! I created GH-91597.

@ezio-melotti
Copy link
Member

@ezio-melotti ezio-melotti commented Apr 16, 2022

I see you already created GH-91596, I closed mine :)

miss-islington pushed a commit to miss-islington/cpython that referenced this issue Apr 16, 2022
…ord() (pythonGH-91596)

* fix the comparison of character and integer by using ord()

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 9300b6d)

Co-authored-by: Yu Liu <yuki.liu@utexas.edu>
ezio-melotti pushed a commit that referenced this issue Apr 16, 2022
…91596)

* fix the comparison of character and integer by using ord()

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
miss-islington added a commit that referenced this issue Apr 16, 2022
…H-91596)

* fix the comparison of character and integer by using ord()

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 9300b6d)

Co-authored-by: Yu Liu <yuki.liu@utexas.edu>
miss-islington added a commit that referenced this issue Apr 16, 2022
…H-91596)

* fix the comparison of character and integer by using ord()

* 📜🤖 Added by blurb_it.

Co-authored-by: blurb-it[bot] <43283697+blurb-it[bot]@users.noreply.github.com>
(cherry picked from commit 9300b6d)

Co-authored-by: Yu Liu <yuki.liu@utexas.edu>
@ezio-melotti ezio-melotti self-assigned this Apr 16, 2022
@ezio-melotti
Copy link
Member

@ezio-melotti ezio-melotti commented Apr 16, 2022

This is now fixed in 3.11/3.10/3.9. Thanks for the report and the PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug
Projects
None yet
Development

No branches or pull requests

2 participants