An extension of this principle is the fact that testing that has been performed on a function that has not changed may still be considered valid.
此原则的一个扩展是这样一个事实,对一个没有变更的功能执行的测试可能仍旧认为是有效的。
But, you can only accomplish two other popular operations on a set of Numbers, finding the minimum and maximum, by a recursive template or extension function.
但是只能通过递归模板或者扩展函数来完成其他两种常见的操作:求最大值和最小值。
This might seem odd, but "function factories" are a familiar feature of Python, and "generator factories" are an obvious conceptual extension of this.
这可能看起来有点古怪,但“函数工厂”是Python的常见特性,并且“生成器工厂”明显是这个概念性扩展。
应用推荐