= Dynamic typing
With <dynamic typing>, the <data type>[types] of values determine the operations permitted during execution, while a variable name can be rebound to values of different <data type>[types]. This differs from changing the type of one existing value. In Python, `x=3; x="three"` rebinds the name; the <integer> object has not become a <string>.<Python 3.14 Data Model>[§3.1, Objects, values and types]{ref}
A call can succeed for several classes if each supplies the operations the <function> actually uses. This is often called <duck typing>: a <function> iterating over its argument can accept different iterable objects. An unsupported operation still fails when reached. Dynamic typing does not imply absence of a <type system>, automatic conversion between every pair of <data type>[types], or that every error waits until execution; syntax errors and some other checks can occur earlier.
Back to article page