[PATCH] D67818: [LNT] Python 3 support: adapt to renaming of raw_input to input
Thomas Preud'homme via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 21 14:31:01 PDT 2019
thopre updated this revision to Diff 221200.
thopre added a comment.
Import input from builtins for input to behave like raw_input in Python 2
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67818/new/
https://reviews.llvm.org/D67818
Files:
lnt/external/stats/stats.py
Index: lnt/external/stats/stats.py
===================================================================
--- lnt/external/stats/stats.py
+++ lnt/external/stats/stats.py
@@ -224,6 +224,7 @@
from __future__ import absolute_import
from __future__ import print_function
+from builtins import input
from . import pstat # required 3rd party module
import math, string, copy # required python modules
from types import *
@@ -776,7 +777,7 @@
samples = ''
while samples not in ['i','r','I','R','c','C']:
print('\nIndependent or related samples, or correlation (i,r,c): ', end=' ')
- samples = raw_input()
+ samples = input()
if samples in ['i','I','r','R']:
print('\nComparing variances ...', end=' ')
@@ -811,7 +812,7 @@
corrtype = ''
while corrtype not in ['c','C','r','R','d','D']:
print('\nIs the data Continuous, Ranked, or Dichotomous (c,r,d): ', end=' ')
- corrtype = raw_input()
+ corrtype = input()
if corrtype in ['c','C']:
m,b,r,p,see = linregress(x,y)
print('\nLinear regression for continuous variables ...')
@@ -2995,7 +2996,7 @@
samples = ''
while samples not in ['i','r','I','R','c','C']:
print('\nIndependent or related samples, or correlation (i,r,c): ', end=' ')
- samples = raw_input()
+ samples = input()
if samples in ['i','I','r','R']:
print('\nComparing variances ...', end=' ')
@@ -3030,7 +3031,7 @@
corrtype = ''
while corrtype not in ['c','C','r','R','d','D']:
print('\nIs the data Continuous, Ranked, or Dichotomous (c,r,d): ', end=' ')
- corrtype = raw_input()
+ corrtype = input()
if corrtype in ['c','C']:
m,b,r,p,see = linregress(x,y)
print('\nLinear regression for continuous variables ...')
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D67818.221200.patch
Type: text/x-patch
Size: 1903 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190921/757eb28d/attachment.bin>
More information about the llvm-commits
mailing list