Book Image

Mastering Python Design Patterns

By : Sakis Kasampalis
Book Image

Mastering Python Design Patterns

By: Sakis Kasampalis

Overview of this book

Table of Contents (23 chapters)
Mastering Python Design Patterns
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Free Chapter
1
The Factory Pattern
Index

Chapter 12. The Interpreter Pattern

There are at least two different user categories for each application:

  • Basic users: The users of this category just want to be able to use the application in an intuitive way. They don't like to spend too much time on configuring or learning the internals of the application. Basic usage is sufficient for them.

  • Advanced users: Those users, who are in fact usually the minority, don't mind spending some extra time on learning how to use the advanced features of the application. They can go as far as learning a configuration (or scripting) language if they know that learning it will:

    • Give them the ability to have better control of an application

    • Help them express their ideas in a better way

    • Make them more productive

The Interpreter pattern is interesting only for the advanced users of an application. That's because the main idea behind Interpreter is to give the ability to non-beginner users and domain experts to use a simple language to express their ideas. However...