Zimmerman Python Descriptors
1. Auflage 2016
ISBN: 978-1-4842-2505-9
Verlag: APRESS
Format: PDF
Kopierschutz: 1 - PDF Watermark
E-Book, Englisch, 68 Seiten
Reihe: Professional and Applied Computing
ISBN: 978-1-4842-2505-9
Verlag: APRESS
Format: PDF
Kopierschutz: 1 - PDF Watermark
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 LearnDiscover descriptor protocolsMaster attribute access and how it applies to descriptorsMake descriptors and discover why you shouldStore attributesCreate read-only descriptors and _delete()Explore the descriptor classesApply the other uses of descriptors and moreWho This Book Is ForExperienced Python coders, programmers and developers.
Zielgruppe
Professional/practitioner
Autoren/Hrsg.
Weitere Infos & Material
Chapter 1: What is a Descriptor.- Chapter 2: The Descriptor Protocol.- Chapter 3: What Are Descriptors Good For?.- Chapter 4: Descriptors in the Standard Library.- Chapter 5: Attribute Access and Descriptors.- Chapter 6: Which Methods Are Needed?.- Chapter 7: Storing the Attributes.- Chapter 8: Read-Only Descriptors.- Chapter 9: Writing _delete_().- Chapter 10: Descriptors are Classes Too.- Chapter 11: Reusing the Wheel.- Chapter 12: Other Uses of Descriptors in the World.




