yield
产生
产量
收益率
屈服
带来
取得
单产
产率
良率
当量
在海水养殖方面,theYield 与当地牡蛎养殖者合作,创立了第一个通过机器学习提高水产养殖产量的产品。 In the sea, the Yield is working with local oyster farmers to create the first product to increase aquaculture production using machine learning. PEP380(Python3.3开始)增加了yield from表达式,允许生成器委托它的行为给另一个生成器。 PEP 380(implemented in Python 3.3) adds the yield from expression, allowing a generator to delegate part of its operations to another generator. 什么时候f123()被称为,它才不是返回yield 语句中的任何值!它返回一个生成器对象。! When f123() is called, it does not return any of the values in the yield statements! 于是你可以使用生成器和yield 操作符来等待异步操作的完成并正确的响应它们。 You can then use generators and the yield operator to wait for asynchronous responses and respond appropriately. 当执行yield 表达式时,生成器会输出i的值,就像return表达式一样。 On executing the yield statement, the generator outputs the value of i, similar to a return statement.
A function containing the yield keyword, when called, doesn't execute immediately; Make_counter中出现关键字yield 意味着这不是一个普通的函数。 The presence of the yield keyword in make_counter means that this is not a normal function.尽管C已经添加了yield 语句,我从来没有使用过,如果要回忆的话它只适用于迭代。 Even though C had added a yield statement, I never used it, and if I recall it was really only meant for iterators. 现在数据已经可以在yield 调用之间流动,你只需一个小小的改变即可进行异步调用。 Now that data is flowing between calls to yield , you just need one small change to allow asynchronous calls. 现在,Yield 与博世(Bosch)、微软(Microsoft)合作的这项技术已经适应了农业。 Now the technology, for which the Yield has partnered with Bosch and Microsoft, has been adapted for agriculture. 因此,在上面的代码中,yield 5语句向test块传递值5作为参数。 Therefore, in the preceding code, the yield 5 statement passes the value 5 as a parameter to the test block. 在函数定义中使用yield 语句足以导致该定义创建生成器函数,而不是正常函数。 Using a yield expression in a function definition is sufficient to cause that definition to create a generator function instead of a normal function. Yield 语句不允许在try…finally结构的try子句中使用。The yield statement is not allowed in the try clause of a try… finally construct.请注意,def包含yield 关键字的函数不是创建生成器的唯一方法; Note that defining a function which contains a yield keyword is not the only way to create a generator; 如果其中650名学生决定上学,则Yield 为65%。 If 650 of those accepted students choose to attend, the yield is 65%. 你可以使用在另一个生成器内部调用yield*而非yield 来使用已存在的生成器。 You can use an existing generator inside another generator by calling yield* instead of yield . 它们写成常规函数,但是每当他们想返回数据时使用yield 语句。 They are written like regular functions but use the yield statement whenever they want to return data. 如果想超过一个参数,然后yield 语句就变成了:. If you want to pass more than one parameters, then the yield statement becomes. 与系统线程不同的是,生成器只有在其函数体内标记为yield 的点才会暂停。 Unlike system threads, a generator is only ever suspended at points marked by yield in its body. 创建生成器的一种方法是使用函数和yield 运算符:. One way to create generators is with functions and the yield operator.
Display more examples
Results: 169 ,
Time: 0.0264