Abstraction
Expose what an object does and hide how it does it.
Easy
Abstraction lets callers use sensor.read() without knowing whether it talks I2C, SPI or a simulator. In Python it is achieved with clear public methods, private helpers and abstract base classes.
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.