Skip to main content
  • Book
  • © 2016

Python Descriptors

Apress

Authors:

  • A unique book dedicated to Python descriptors
  • Deals with an important topic for the many applications Python has
  • Python is popular for web development, big data analytics, finance, game development and more
  • 42k Accesses

Buy it now

Buying options

eBook USD 9.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Other ways to access

This is a preview of subscription content, log in via an institution to check for access.

Table of contents (12 chapters)

  1. Front Matter

    Pages i-xv
  2. About Descriptors

    1. Front Matter

      Pages 1-1
    2. What Is a Descriptor?

      • Jacob Zimmerman
      Pages 3-4
    3. The Descriptor Protocol

      • Jacob Zimmerman
      Pages 5-6
    4. What Are Descriptors Good For?

      • Jacob Zimmerman
      Pages 7-8
    5. Descriptors in the Standard Library

      • Jacob Zimmerman
      Pages 9-13
    6. Attribute Access and Descriptors

      • Jacob Zimmerman
      Pages 15-21
  3. Making Descriptors

    1. Front Matter

      Pages 23-23
    2. Which Methods Are Needed?

      • Jacob Zimmerman
      Pages 25-28
    3. Storing the Attributes

      • Jacob Zimmerman
      Pages 29-40
    4. Read-Only Descriptors

      • Jacob Zimmerman
      Pages 41-45
    5. Writing __delete__()

      • Jacob Zimmerman
      Pages 47-47
    6. Descriptors are Classes Too

      • Jacob Zimmerman
      Pages 49-51
    7. Reusing the Wheel

      • Jacob Zimmerman
      Pages 53-57
    8. Other Uses of Descriptors in the World

      • Jacob Zimmerman
      Pages 59-60
  4. Back Matter

    Pages 61-64

About this book

This short book on Python descriptors is a collection of knowledge and ideas from many sources on dealing with and creating descriptors. And, after going through the things all descriptors have in common, the author explores ideas that have multiple ways of being implemented as well as completely new ideas never seen elsewhere before.



This truly is a comprehensive guide to creating Python descriptors. As a bonus: A pip install-able library, descriptor_tools, was written alongside this book and is an open source library on GitHub.



There aren't many good resources out there for writing Python descriptors, and extremely few books. This is a sad state of affairs, as it makes it difficult for Python developers to get a really good understanding of how descriptors work and the techniques to avoid the big gotchas associated with workingwith them.



What You Will Learn
  • Discover descriptor protocols
  • Master attribute access and how it applies to descriptors
  • Make descriptors and discover why you should
  • Store attributes
  • Create read-only descriptors and _delete()
  • Explore the descriptor classes
  • Apply the other uses of descriptors and more






Who This Book Is For

Experienced Python coders, programmers and developers.






Authors and Affiliations

  • Placeholder, USA

    Jacob Zimmerman

About the author

Jacob Zimmerman is a certified Java programmer and a Python and Kotlin enthusiast.

Bibliographic Information

Buy it now

Buying options

eBook USD 9.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Other ways to access