The concept behind duck typing, also known as late binding, is pretty simple; if an object responds to all the methods a function is expected to call, that object can be passed to the function.
Ducktyping背后的概念非常简单,就是所谓的迟绑定;如果对象具有某个函数希望调用的所有方法,就可以将这个对象传递给该函数。
This strange bird that some may call a duck is actually pretty fascinating.
这种奇怪的鸟,有些人可能把牠叫做野鸭,实际上是非常令人着迷的。
有一只可爱的小鸭。
We make some pretty good Crispy Barbecued Duck.
我们的脆皮鸭不错。
We make some pretty good Crispy Barbecued Duck.
我们的脆皮鸭不错。
应用推荐