
۴۴٬۰۰۰تومان
نوع فایل دانلود: EPUB
پس از خرید، یک فایل EPUB دریافت میکنید.
این فایل با Calibre، Apple Books و سایر کتابخوانهای دیجیتال مناسب است.
دسکریپتور بسازید و ایدهها و مثالهایی ببینید که نشان میدهند چطور از دسکریپتورها بهخوبی استفاده کنید. در این کتاب کوتاه، دسکریپتورها را بهطور کلی میشناسید؛ با توضیح عمیق دربارهٔ اینکه دسکریپتور چیست، چطور کار میکند و چطور به کار گرفته میشود. وقتی سادگی پروتکل دسکریپتور را فهمیدید، نویسنده سراغ استفاده و ساخت دسکریپتور در عمل میرود و نکتهها، الگوها و راهنماییهای کاربردی فراوانی میدهد. چون دسکریپتورها ذاتاً انعطافپذیرند، با چندین مثال کار میکنید که نشان میدهند چطور بهتر از آنها بهره ببرید. این ویراست دوم در سراسر کتاب مطالب تازهای دارد؛ از جمله مطالب جدید دربارهٔ دسکریپتورهای __set_name__()، فلوچارتهای تازه و بهتر برای توضیح سازوکار درونی دسکریپتورها، و یک فصل کاملاً جدید دربارهٔ ویژگیهای سطح نمونه — سادهترین راه برای اینکه دسکریپتورها را از همان اول درست بسازید. با اینکه کوتاه است، __Python Descriptors__ راهنمایی جامع برای ساخت دسکریپتورهای پایتون است و شامل کتابخانهای قابل نصب با pip به نام descriptor_tools میشود که همزمان با این کتاب نوشته شده و یک کتابخانهٔ متنباز روی GitHub است. پس از خواندن این کتاب، درک محکمی از نحوهٔ کار دسکریپتورها خواهید داشت و تکنیکهایی میآموزید تا از دامهای بزرگ هنگام کار با آنها دوری کنید.**آنچه خواهید آموخت**پروتکلهای دسکریپتور را بشناسید. بر دسترسی به ویژگیها و ارتباط آن با دسکریپتورها مسلط شوید. دسکریپتورهای خودتان را بسازید. از دسکریپتورها برای ذخیرهٔ ویژگیها استفاده کنید. دسکریپتورهای فقطخواندنی بسازید. کلاسهای دسکریپتور را بررسی کنید. کاربردهای دیگر دسکریپتورها را به کار بگیرید. **این کتاب برای چه کسانی است**برنامهنویسان و توسعهدهندگان باتجربهٔ پایتون.
Create descriptors and see ideas and examples of how to use descriptors effectively. In this short book, you'll explore descriptors in general, with a deep explanation of what descriptors are, how they work, and how they're used. Once you understand the simplicity of the descriptor protocol, the author delves into using and creating descriptors in practice, with plenty of tips, patterns, and real-world guidance. Because descriptors are inherently flexible, you'll work with multiple examples illustrating how to best take advantage of them.This second edition includes additions throughout, including new material covering the set\_name\_() descriptors, new and improved flowcharts to explain the inner workings of descriptors, and a completely new chapter to address instance-level attributes, the easiest way to create descriptors correctly the first time. Although brief, __Python Descriptors__ is a comprehensive guide to creating Python descriptors, including a pip install-able library called descriptor\_tools, which was written alongside this book and is an open source library on GitHub. After reading this book, you will have a solid understanding of how descriptors work and the techniques to avoid the big gotchas associated with working with them.**What You Will Learn**Discover descriptor protocolsMaster attribute access and how it applies to descriptorsBuild your own descriptorsUse descriptors to store attributesCreate read-only descriptorsExplore the descriptor classesApply the other uses of descriptors **Who This Book Is For**Experienced Python coders, programmers, and developers.