What is Duck Type in Python? tccicomputercoaching.com
As per Technical Definition:
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.
Actually it is not a python exclusive feature, since almost every dynamic language presents that behaviour.
Duck typing is a feature of a type system where the semantics of a class is determined by his ability to respond to some message (method or property).
In short Duck Typing is a way of programming in which an object passed into a function or method supports all method signatures and attributes expected of that object at run time.
Call us @ 9825618292
Visit us @ www.tccicomputercoaching.com