-
Notifications
You must be signed in to change notification settings - Fork 13
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
CA-389177: Fix yes/no input for Python2/XS8: revert to raw_input() on Python2 #87
CA-389177: Fix yes/no input for Python2/XS8: revert to raw_input() on Python2 #87
Conversation
Pull Request Test Coverage Report for Build 8020102376Details
💛 - Coveralls |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #87 +/- ##
=======================================
Coverage 88.29% 88.29%
=======================================
Files 18 18
Lines 2195 2196 +1
=======================================
+ Hits 1938 1939 +1
Misses 257 257
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
31f1537
to
3120459
Compare
Python2 `input()` is eqivalent to: `eval(raw_input())`, but we need the raw_input() function in Python2, revert back to it. For reading unqoute strings like `y` without "quotes" from stdin, we need to use `raw_input()` on Python2. Signed-off-by: Bernhard Kaindl <[email protected]>
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.
Documentation for this change :https://codeql.github.com/codeql-query-help/python/py-use-of-input/
3120459
to
d0e569d
Compare
Python2
input()
is eqivalent to:eval(raw_input())
, which was wrong for Python2. Fix it.For reading input lines like
y
(without "quotes") from stdin, we need to useraw_input()
on Python2.AshwinH contributed this comment in his approval:
Documentation for this change :https://codeql.github.com/codeql-query-help/python/py-use-of-input/