Discuss / Python / yield from错误哦

yield from错误哦

Topic source
yield from user.save()

返回错误:SyntaxError: 'yield' outside function

廖老师我的是3.5版本python,为什么按照您的方法不能运行呢?

廖雪峰

#2 Created at ... [Delete] [Delete and Lock User]

yield只能在function中执行


  • 1

Reply