我试图从readLine调用中创建无限的字符串流:val in = new BufferedReader(new InputStreamReader(System in))但是看起来readLine调用并没有被懒惰地调用。在输入该代码后,readLine立即期望输入,然后流变成相同输入的无限列表。有可能实现我心目中的目标吗?
我有but代码逐行读取文本文件,但它抱怨for loop上的一个错误。Type 'Interface' must have a '[Symbol.asyncIterator]()' method that returns an async iterator.ts(2504)const fileStream = fs.createReadStream('test.text');
mails = open('/path/emails.txt','r+')mailList = [i.strip() for i in mails.readlines587
password = "Sender'sPassword"
recipient = [i.strip() for i in mails.readlines