Python – Beyond the Basics

Python – Beyond the Basics

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 7h 22m | 1.37 GB

Python – Beyond the Basics deepens and broadens your knowledge of Python, a dynamic language popular for web development, big data, science, and scripting.

Python – Beyond the Basics builds directly on the foundations laid in our introductory Python course, Python Fundamentals. Python is a great dynamic language for web development, big data, science, and scripting. In this course we add breadth and depth to your Python skills, exploring the topics you’ll need to create robust and readable applications of any size. On completing this course, you’ll be familiar with the majority of Python techniques and constructs used in Python programs. Crucially, we’ll also advise you on when – and when not – to use the different tools available in Python to best effect, to maximize the quality of your code, your productivity, and the joy inherent in coding in Python.

Table of Contents

1 Prerequisites
2 Packages
3 Imports from sys.path
4 Implementing Packages
5 Subpackages
6 Example – A Full Program
7 Relative Imports
8 Controlling Imports with all
9 Namespace Packages
10 Executable Directories
11 Recommended Layout
12 Duck Tails – Modules Are Singletons
13 Summary
14 Function Review
15 Callable Instances
16 Classes Are Callable
17 Conditional Expressions
18 Lambdas
19 Detecting Callable Objects
20 Extended Formal Argument Syntax
21 Extended Call Syntax
22 Forwarding Arguments
23 Duck Tail – Transposing Tables
24 Summary
25 Local Functions
26 Returning Functions From Functions
27 Closures and Nested Scopes
28 Function Factories
29 The Nonlocal Keyword
30 Function Decorators
31 A First Decorator Example
32 What Can Be a Decorator
33 Instances as Decorators
34 Multiple Decorators
35 Decorating Methods
36 functools.wraps()
37 Duck Tails – Validating Arguments
38 Summary
39 Class Attributes
40 Static Methods
41 Class Methods
42 Static Methods with Inheritance
43 Class Methods with Inheritance
44 Properties
45 Properties and Inheritance
46 Duck Tail – The Template Method Pattern
47 Summary
48 Two String Representations
49 repr()
50 str()
51 When Are the Representations Used
52 Interaction with format()
53 reprlib
54 asciii(), ord(), and chr()
55 Duck Tail – Bigger Isn’t Always Better
56 Summary
57 Reviewing int and float
58 The Decimal Module and the Decimal Type
59 Rational Numbers with the Fraction Type
60 The Complex Type and the cmath Module
61 Built-In Numeric Functions abs() and round()
62 Number Base Conversions
63 The datetime Module and date Type
64 The time Type
65 The datetime Type
66 Durations with the timedelta Type
67 Arithmetic with datetime
68 Time Zones
69 Duck Tail – Floating Point vs. Rational Numbers
70 Summary
71 Multi-Input Comprehensions
72 Nested Comprehensions
73 The map() Function
74 Multiple Input Sequences
75 map() Versus Comprehensions
76 The filter() Function
77 The functools.reduce() Function
78 Combining map() and reduce()
79 The Iteration Protocols
80 Putting the Protocols Together
81 Alternative Iterable Protocol
82 Extended iter() Format
83 Duck Tail – Iterator for Streamed Sensor Data
84 Summary
85 Inheritance Overview
86 A Realistic Example – SortedList
87 The Built-In isinstance() Function
88 The Built-In issubclass() Function
89 Multiple Inheritance
90 Details of Multiple Inheritance
91 Method Resolution Order
92 How Is Method Resolution Order Calculated
93 The Built-In super() Function
94 Class-Bound Super Proxies
95 Instance-Bound Super Proxies
96 Calling super() Without Arguments
97 SortedIntList Explained
98 The Object Class
99 Duck Tail – Inheritance for Implementation Sharing
100 Summary
101 Collection Protocol Overview
102 Collection Construction
103 The Container Protocol
104 The Sized Protocol
105 The Iterable Protocol
106 The Sequence Protocol – Indexing
107 The Sequence Protocol – Slicing
108 Comprehensible Test Results With repr ()
109 Implementing Equality and Inequality
110 The Sequence Protocol – Reversing
111 The Sequence Protocol – index()
112 The Sequence Protocol – count()
113 Improving Performance from O(N) to O(log n)
114 Refactoring to Avoid Don’t Repeat Yourself (DRY)
115 Checking Protocol Implementations
116 The Sequence Protocol – Concatenation and Repetition
117 The Set Protocol
118 Duck Tail – Making a Mutable Set
119 Summary
120 Always Specify an Exception Type
121 The Standard Exception Hierarchy
122 Exception Payloads
123 Defining New Exceptions
124 Chaining Exceptions
125 Traceback Objects
126 Assertions – Internal Invariants
127 Assertions – Class Invariants
128 Assertions – Performance
129 Duck Tail – Preconditions and Postconditions
130 Summary
131 What Is a Context Manager
132 The Context Manager Protocol
133 A First Context Manager Example
134 enter ()
135 exit ()
136 exit () and Exception Propagation
137 The with-statement Expansion
138 contextlib.contextmanager
139 Multiple Context Managers
140 Don’t Pass a List!
141 Duck Tail – Context Managers for Transactions
142 Summary
143 Object Types in Depth
144 Introspecting Objects
145 Introspecting Scopes
146 The Python Standard Library Inspect Module
147 Duck Tail – An Object Introspection Tool
148 Summary