what is "duck typing"???

2019-03-20  本文已影响0人  宣雄民

Duck typing in computer programming is an application of the duck test—"If it walks like a duck and it quacks like a duck, then it must be a duck"—to determine if an object can be used for a particular purpose. With normal typing, suitability is determined by an object's type. In duck typing, an object's suitability is determined by the presence of certain methods and properties, rather than the type of the object itself.

Updating....

上一篇 下一篇

猜你喜欢

热点阅读