دسترسی نامحدود
برای کاربرانی که ثبت نام کرده اند
برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید
در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید
برای کاربرانی که ثبت نام کرده اند
درصورت عدم همخوانی توضیحات با کتاب
از ساعت 7 صبح تا 10 شب
ویرایش:
نویسندگان: Patrick Viafore
سری:
ISBN (شابک) : 9781098100667
ناشر: O'Reilly Media, Inc.
سال نشر: 2021
تعداد صفحات:
زبان: English
فرمت فایل : EPUB (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود)
حجم فایل: 6 Mb
در صورت تبدیل فایل کتاب Robust Python به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.
توجه داشته باشید کتاب پایتون قوی نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.
Copyright Table of Contents Preface Who Should Read This Book About This Book Conventions Used in This Book Using Code Examples O’Reilly Online Learning How to Contact Us Acknowledgments Chapter 1. Introduction to Robust Python Robustness Why Does Robustness Matter? What’s Your Intent? Asynchronous Communication Examples of Intent in Python Collections Iteration Law of Least Surprise Closing Thoughts Part I. Annotating Your Code with Types Chapter 2. Introduction to Python Types What’s in a Type? Mechanical Representation Semantic Representation Typing Systems Strong Versus Weak Dynamic Versus Static Duck Typing Closing Thoughts Chapter 3. Type Annotations What Are Type Annotations? Benefits of Type Annotations Autocomplete Typecheckers Exercise: Spot the Bug When to Use Type Annotations Closing Thoughts Chapter 4. Constraining Types Optional Type Union Types Product and Sum Types Literal Types Annotated Types NewType Final Types Closing Thoughts Chapter 5. Collection Types Annotating Collections Homogeneous Versus Heterogeneous Collections TypedDict Creating New Collections Generics Modifying Existing Types As Easy as ABC Closing Thoughts Chapter 6. Customizing Your Typechecker Configuring Your Typechecker Configuring mypy Mypy Reporting Speeding Up mypy Alternative Typecheckers Pyre Pyright Closing Thoughts Chapter 7. Adopting Typechecking Practically Trade-offs Breaking Even Earlier Find Your Pain Points Target Code Strategically Lean on Your Tooling Closing Thoughts Part II. Defining Your Own Types Chapter 8. User-Defined Types: Enums User-Defined Types Enumerations Enum When Not to Use Advanced Usage Automatic Values Flags Integer Conversion Unique Closing Thoughts Chapter 9. User-Defined Types: Data Classes Data Classes in Action Usage String Conversion Equality Relational Comparison Immutability Comparison to Other Types Data Classes Versus Dictionaries Data Classes Versus TypedDict Data Classes Versus namedtuple Closing Thoughts Chapter 10. User-Defined Types: Classes Class Anatomy Constructors Invariants Avoiding Broken Invariants Why Are Invariants Beneficial? Communicating Invariants Consuming Your Class What About Maintainers? Encapsulation and Maintaining Invariants Encapsul-what, Now? Protecting Data Access Operations Closing Thoughts Chapter 11. Defining Your Interfaces Natural Interface Design Thinking Like a User Natural Interactions Natural Interfaces in Action Magic Methods Context Managers Closing Thoughts Chapter 12. Subtyping Inheritance Substitutability Design Considerations Composition Closing Thoughts Chapter 13. Protocols Tension Between Typing Systems Leave the Type Blank or Use Any Use a Union Use Inheritance Use Mixins Protocols Defining a Protocol Advanced Usage Composite Protocols Runtime Checkable Protocols Modules Satisfying Protocols Closing Thoughts Chapter 14. Runtime Checking With pydantic Dynamic Configuration pydantic Validators Validation Versus Parsing Closing Thoughts Part III. Extensible Python Chapter 15. Extensibility What Is Extensibility? The Redesign Open-Closed Principle Detecting OCP Violations Drawbacks Closing Thoughts Chapter 16. Dependencies Relationships Types of Dependencies Physical Dependencies Logical Dependencies Temporal Dependencies Visualizing Your Dependencies Visualizing Packages Visualizing Imports Visualizing Function Calls Interpreting Your Dependency Graph Closing Thoughts Chapter 17. Composability Composability Policy Versus Mechanisms Composing on a Smaller Scale Composing Functions Composing Algorithms Closing Thoughts Chapter 18. Event-Driven Architecture How It Works Drawbacks Simple Events Using a Message Broker The Observer Pattern Streaming Events Closing Thoughts Chapter 19. Pluggable Python The Template Method Pattern The Strategy Pattern Plug-in Architectures Closing Thoughts Part IV. Building a Safety Net Chapter 20. Static Analysis Linting Writing Your Own Pylint Plug-in Breaking Down the Plug-in Other Static Analyzers Complexity Checkers Security Analysis Closing Thoughts Chapter 21. Testing Strategy Defining Your Test Strategy What Is a Test? Reducing Test Cost AAA Testing Closing Thoughts Chapter 22. Acceptance Testing Behavior-Driven Development The Gherkin Language Executable Specifications Additional behave Features Parameterized Steps Table-Driven Requirements Step Matching Customizing the Test Life Cycle Using Tags to Selectively Run Tests Report Generation Closing Thoughts Chapter 23. Property-Based Testing Property-Based Testing with Hypothesis The Magic of Hypothesis Contrast with Traditional Tests Getting the Most Out of Hypothesis Hypothesis Strategies Generating Algorithms Closing Thoughts Chapter 24. Mutation Testing What Is Mutation Testing? Mutation Testing with mutmut Fixing Mutants Mutation Testing Reports Adopting Mutation Testing The Fallacy of Coverage (and Other Metrics) Closing Thoughts Index About the Author Colophon