Python AttributeError:缓冲区

Python AttributeError:缓冲区,python,Python,当我使用- a,b=map(int,sys.stdin.buffer.read().split()) 而 a,b=(int(x) for x in input().split()) 很好 还有一种更快的方法可以在python中执行输入输出操作吗?从stdin中读取一行并将其解析为int的标准方法如下: # Python 2 list_of_ints = [int(x) for x in raw_input().split()] # Python 3 list_of_ints = [int(

当我使用-

a,b=map(int,sys.stdin.buffer.read().split())

a,b=(int(x) for x in input().split())
很好


还有一种更快的方法可以在python中执行输入输出操作吗?

从stdin中读取一行并将其解析为int的标准方法如下:

# Python 2
list_of_ints = [int(x) for x in raw_input().split()]

# Python 3
list_of_ints = [int(x) for x in input().split()]

或者,您可以使用
sys.stdin.readline()
而不是
input
/
raw\u input
。Python中类似文件的对象(包括标准的in/out/error)没有,也从来没有
缓冲区
属性。

你怎么会认为
sys.stdin
缓冲区
属性?