Advanced Python

Advanced Python

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 3h 53m | 604 MB

This course will go beyond everyday Python to the techniques needed by experienced programmers and by library and framework developers.

Over time, Python has exploded in popularity, from being an obscure scripting language to becoming one of the most popular, and widely used languages in the world. In this course, Advanced Python, you’ll learn advanced topics, a knowledge of which will set you apart from the greater number of Python developers. First, you’ll explore how to gain fine-grained control over attribute access. Next, you’ll discover how to intercept class-object construction. Finally, you’ll learn the subtle, but powerful, controls Python gives you over class relationships. By the end of this course, you’ll know enough Python to understand the advanced techniques used to implement sophisticated frameworks and much more.

Table of Contents

1 Course Overview
2 Advanced Python
3 Introducing Advanced Flow Control
4 Loop-else Clauses and While-else
5 While-else for Evaluating Stack Programs
6 For-else Clauses and Handling Search Failure
7 Alternatives to Loop-else Clauses
8 Try-else Clauses
9 Emulating Switch Statements
10 Dispatching on Type
11 Double Dispatch with Methods
12 Summary
13 Everything Is Bits and Bytes
14 Bitwise Operations on Integers
15 Byte-wise Operations with Integers
16 The Bytes Type in Depth
17 The bytearray Type
18 Interpreting Binary Structures
19 The memoryview Type
20 Memory-mapped Files
21 Summary
22 Introducing Object Internals
23 How are Python Objects Represented
24 Overriding getattr
25 Overriding setattr
26 Pitfalls with getattr
27 Overriding delattr
28 Customizing Attribute Storage
29 Direct vs. Indirect Access to dict
30 Overriding getattribute
31 Attribute Lookup for Special Methods
32 Where are Methods Stored
33 Trading Size for Dynamism with Slots
34 Summary
35 Introducing Descriptors
36 Properties are Descriptors
37 Implementing a Descriptor
38 Calling Descriptors on Classes
39 Data vs. Non-data Descriptors
40 Summary
41 Instance Creation
42 Allocation with new ()
43 Customizing Allocation
44 Summary
45 Metaclasses
46 Class Allocation and Initialization
47 Metaclass Keyword Arguments
48 Metaclass Method Visibility
49 Metaclass call – The Instance Constructor
50 A Practical Metaclass Example
51 Naming Descriptors Using Metaclasses
52 Metaclasses and Inheritance
53 Summary
54 Class Decorators
55 Enforcing Class Invariants
56 Detecting and Wrapping Properties
57 Chaining Class Decorators
58 Summary
59 Introducing Abstract Base Classes
60 Abstract Base Classes in Python
61 Abstract Base Classes in Practice
62 Non-transitive Subclass Relationships
63 Method Resolution with Virtual Base Classes
64 Library Support for Abstract Base Classes
65 Virtual Subclass Registration
66 Combining Subclass Detection and Registration
67 The ABC Convenience Base Class
68 Declaring Abstract Methods
69 Combining Method Decorators
70 Improving @invariant with ABCs
71 Summary