Design Pattern Examples
Overview of object-oriented design patterns
DesignPatternExamples_python.adapter.adapter_exercise Namespace Reference

Functions

def Adapter_Exercise ()
 Example of using the Adapter Pattern.
 

Function Documentation

◆ Adapter_Exercise()

def Adapter_Exercise ( void  )

Example of using the Adapter Pattern.

This example adapts functions that return error codes into a class object that throws exceptions, which is more fitting of an object-oriented language.

Definition at line 16 of file adapter_exercise.py.