Title Statements
- Full title :Clean Code in Python : Develop Maintainable and Efficient Code, 2nd Edition.
Summary
References -- Chapter 3: General Traits of Good Code -- Design by contract -- Preconditions -- Postconditions -- Pythonic contracts -- Design by contract - conclusions -- Defensive programming -- Error handling -- Value substitution -- Exception handling -- Using assertions in Python -- Separation of concerns -- Cohesion and coupling -- Acronyms to live by -- DRY/OAOO -- YAGNI -- KIS -- EAFP/LBYL -- Inheritance in Python -- When inheritance is a good decision -- Anti-patterns for inheritance -- Multiple inheritance in Python -- Method Resolution Order (MRO) -- Mixins.
This Python coding book will help you understand the problems that arise due to inefficient code, demonstrating to you how to correct them.
Edition Statements
- Publication Date:2021.
- Edition:2nd ed
Publication Statements
- Publisher(s):Packt Publishing, Limited
- Place of Publication:Birmingham
- Language:eng
- Publication Date:2021.
Notes
Description based upon print version of record.
How small should an interface be?
The Physical Object
- Description:1 online resource (423 p.)
Edition Identifiers
- ISBN:9781800562097, 1800562098
- oclc:on1231608794
- LC Classification:QA76.73.P98
- Dewey Decimal:005.133
Table of Contents
Cover -- Copyright -- Packt Page -- Contributors -- Table of Contents -- Preface -- Chapter 1: Introduction, Code Formatting, and Tools -- Introduction -- The meaning of clean code -- The importance of having clean code -- Some exceptions -- Code formatting -- Adhering to a coding style guide on your project -- Documentation -- Code comments -- Docstrings -- Annotations -- Do annotations replace docstrings? -- Tooling -- Checking type consistency -- Generic validations in code -- Automatic formatting -- Setup for automatic checks -- Summary -- References -- Chapter 2: Pythonic Code
Indexes and slices -- Creating your own sequences -- Context managers -- Implementing context managers -- Comprehensions and assignment expressions -- Properties, attributes, and different types of methods for objects -- Underscores in Python -- Properties -- Creating classes with a more compact syntax -- Iterable objects -- Creating iterable objects -- Creating sequences -- Container objects -- Dynamic attributes for objects -- Callable objects -- Summary of magic methods -- Caveats in Python -- Mutable default arguments -- Extending built-in types -- A brief introduction to asynchronous code
Argumen…
Subjects
Writers
No reviews yet. Be the first to rate this work.
Files & Downloads
No downloadable files are registered for this work yet.
Rate & Review