-
-
Notifications
You must be signed in to change notification settings - Fork 33.2k
Fix while statements with non-bool conditions in _pyrepl
#127509
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
Conversation
This change is minor, I don't think it's necessary to add a NEWS and title-label. |
I think it is. |
But haven't we always advocated not using numbers as a condition? |
We don't need a NEWS; users won't see or care about this change. With that being said, this is a cosmetic change. I'll let the repl experts decide if they want to take it. |
I decided to land this for consistency but please don't read this as encouraging these kind of changes as normally we tend to reject purely cosmetic changes based on problems for backporting and other considerations |
Thanks for your controbution @rruuaanng |
Speaking of backporting, do we want this in 3.13? |
|
@pablogsal Thank you for the merge :). @ZeroIntensity It seems that an exception occurred in the |
Don't worry, it's unrelated. I think Eric filed an issue a couple days ago about some intermittent failures on that test. |
…7509) Fix non-bool value conditions
In Python, it is recommended to use bool values as conditions, but there are still scenarios where integers are used in pyrepl, and we use
while True
instead ofwhile 1
.(I hope this is not considered a cosmetic change. They were discovered when I was learning pyrepl.)