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

A software example


There are many software examples of internal DSLs. PyT is a Python DSL to generate (X)HTML. PyT focuses on performance and claims to have comparable speed with Jinja2 [j.mp/ghpyt]. Of course, we should not assume that the Interpreter pattern is necessarily used in PyT. However, since it is an internal DSL, Interpreter is a very good candidate for it.

Chromium is a FOSS browser that inspired Google Chrome [j.mp/chromiumb]. A part of the Mesa library Python binding of Chromium uses the Interpreter pattern to translate C model arguments to Python objects and executing the related commands [j.mp/intchromium].