Metaprogramming with Python
eBook - ePub

Metaprogramming with Python

  1. 402 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Metaprogramming with Python

About this book

A practical approach to metaprogramming with real-world examples that enables the development of advanced frameworks, libraries, and applications using PythonKey Features• Learn applied metaprogramming through a simple step-by-step approach• Work with easily understandable examples and explanations that take you deep into the theory of metaprogramming• Get practical experience in writing reusable code with real-world examplesBook DescriptionEffective and reusable code makes your application development process seamless and easily maintainable. With Python, you will have access to advanced metaprogramming features that you can use to build high-performing applications. The book starts by introducing you to the need and applications of metaprogramming, before navigating the fundamentals of object-oriented programming. Next, you will learn about simple decorators, work with metaclasses, and later focus on introspection and reflection. You'll also delve into generics and typing before defining templates for algorithms. As you progress, you will understand your code using abstract syntax trees and explore method resolution order. This Python book also shows you how to create your own dynamic objects before structuring the objects through design patterns. Finally, you will learn simple code-generation techniques along with discovering best practices and eventually building your own applications. By the end of this learning journey, you'll have acquired the skills and confidence you need to design and build reusable high-performing applications that can solve real-world problems.What you will learn• Understand the programming paradigm of metaprogramming and its need• Revisit the fundamentals of object-oriented programming• Define decorators and work with metaclasses• Employ introspection and reflection on your code• Apply generics, typing, and templates to enhance your code• Get to grips with the structure of your code through abstract syntax trees and the behavior through method resolution order• Create dynamic objects and generate dynamic code• Understand various design patterns and best practicesWho this book is forIf you are an intermediate-level Python programmer looking to enhance your coding skills by developing reusable and advanced frameworks, then this book is for you. Basic knowledge of Python programming will help you get the most out of this learning journey.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Metaprogramming with Python by Sulekha AloorRavi in PDF and/or ePUB format, as well as other popular books in Computer Science & Computer Science General. We have over one million books available in our catalogue for you to explore.

Table of contents

  1. Metaprogramming with Python
  2. Contributors
  3. Preface
  4. Part 1: Fundamentals – Introduction to Object-Oriented Python and Metaprogramming
  5. Chapter 1: The Need for and Applications of Metaprogramming
  6. Chapter 2: Refresher of OOP Concepts in Python
  7. Part 2: Deep Dive – Building Blocks of Metaprogramming I
  8. Chapter 3: Understanding Decorators and their Applications
  9. Chapter 4: Working with Metaclasses
  10. Chapter 5: Understanding Introspection
  11. Chapter 6: Implementing Reflection on Python Objects
  12. Chapter 7: Understanding Generics and Typing
  13. Chapter 8: Defining Templates for Algorithms
  14. Part 3: Deep Dive – Building Blocks of Metaprogramming II
  15. Chapter 9: Understanding Code through Abstract Syntax Tree
  16. Chapter 10: Understanding Method Resolution Order of Inheritance
  17. Chapter 11: Creating Dynamic Objects
  18. Chapter 12: Applying GOF Design Patterns – Part 1
  19. Chapter 13: Applying GOF Design Patterns – Part 2
  20. Chapter 14: Generating Code from AST
  21. Chapter 15: Implementing a Case Study
  22. Chapter 16: Following Best Practices
  23. Other Books You May Enjoy