DEV Community

Discussion on: Python Protocol Oriented Programming

Collapse
 
paddy3118 profile image
Paddy3118

The type of the object determines its implementation, which exposes the behavior, the behavior are the things that the object can do or things that can be done with the object.

Python can be constrained to act that way, but it is dynamic; types and instances can be modified at runtime by runtime data.
An objects attributes at time of use is closer, but some find it easier to reason about their code if they don't use this capability.