Design Pattern Examples
Overview of object-oriented design patterns
interpreter_exercise.py File Reference

Implementation of the Interpreter_Exercise() function as used in the Interpreter Pattern. More...

Go to the source code of this file.

Namespaces

namespace  DesignPatternExamples_python
 The DesignPatternExamples_python package, containing 20 examples of design patterns, each in their own namespace.
 
namespace  DesignPatternExamples_python.interpreter
 
namespace  DesignPatternExamples_python.interpreter.interpreter_exercise
 

Functions

str _TokensToString (list[int] tokens)
 Helper method to convert a list of tokens to a string representation.
 
def Interpreter_Exercise ()
 Example of using the Interpreter Pattern.
 

Variables

list _sentenceTokenLists
 A list of predefined token lists.
 

Detailed Description

Implementation of the Interpreter_Exercise() function as used in the Interpreter Pattern.

Definition in file interpreter_exercise.py.