Python 3: Deep Dive (Part 2)

Python 3: Deep Dive (Part 2)
Python 3: Deep Dive (Part 2)

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 34.5 Hours | 19.5 GB
eLearning | Skill level: All Levels


Sequences, Iterables, Iterators, Generators, Context Managers and Generator-based Coroutines

Part 2 of this Python 3: Deep Dive series is an in-depth look at:

  • sequences
  • iterables
  • iterators
  • generators
  • comprehensions
  • context managers
  • generator based coroutines

I will show you exactly how iteration works in Python – from the sequence protocol, to the iterable and iterator protocols, and how we can write our own sequence and iterable data types.

We’ll go into some detail to explain sequence slicing and how slicing relates to ranges.

We look at comprehensions in detail as well and I will show you how list comprehensions are actually closures and have their own scope, and the reason why subtle bugs sometimes creep in to list comprehensions that we might not expect.

We’ll take a deep dive into the itertools module and look at all the functions available there and how useful (but overlooked!) they can be.

We also look at generator functions, their relation to iterators, and their comprehension counterparts (generator expressions).

Context managers, an often overlooked construct in Python, is covered in detail too. There we will learn how to create and leverage our own context managers and understand the relationship between context managers and generator functions.

Finally, we’ll look at how we can use generators to create coroutines.

Each section is followed by a project designed to put into practice what you learn throughout the course.

This course series is focused on the Python language and the standard library. There is an enormous amount of functionality and things to understand in just the standard CPython distribution, so I do not cover 3rd party libraries – this is a Python deep dive, not an exploration of the many highly useful 3rd party libraries that have grown around Python – those are often sufficiently large to warrant an entire course unto themselves! Indeed, many of them already do!

What you’ll learn

  • You’ll be able to leverage the concepts in this course to take your Python programming skills to the next level.
  • Sequence Types and the sequence protocol
  • Iterables and the iterable protocol
  • Iterators and the iterator protocol
  • List comprehensions and their relation to closures
  • Generator functions
  • Generator expressions
  • Context managers
  • Creating context managers using generator functions
  • Using Generators as Coroutines
+ Table of Contents

Introduction
1 Course Overview
2 Pre-Requisites
3 Python Tools Needed

Sequence Types
4 Introduction
5 Slicing – Lecture
6 Slicing – Coding
7 Custom Sequences – Part 1 – Lecture
8 Custom Sequences – Part 1 – Coding
9 In-Place Concatenation and Repetition – Lecture
10 In-Place Concatenation and Repetition – Coding
11 Assignments in Mutable Sequences – Lecture
12 Assignments in Mutable Sequences – Coding
13 Custom Sequences – Part 2 – Lecture
14 Custom Sequences – Part 2A – Coding
15 Sequence Types – Lecture
16 Custom Sequences – Part 2B – Coding
17 Custom Sequences – Part 2C – Coding
18 Sorting Sequences – Lecture
19 Sorting Sequences – Coding
20 List Comprehensions – Lecture
21 List Comprehensions – Coding
22 Sequence Types – Coding
23 Mutable Sequence Types – Lecture
24 Mutable Sequence Types – Coding
25 Lists vs Tuples
26 Index Base and Slice Bounds – Rationale
27 Copying Sequences – Lecture
28 Copying Sequences – Coding

Project 1
29 Project Description
30 Project Solution Goal 1
31 Project Solution Goal 2

Iterables and Iterators
32 Introduction
33 Lazy Iterables – Lecture
34 Lazy Iterables – Coding
35 Python’s Built-In Iterables and Iterators – Lecture
36 Python’s Built-In Iterables and Iterators – Coding
37 Sorting Iterables
38 The iter() Function – Lecture
39 The iter() Function – Coding
40 Iterating Callables – Lecture
41 Iterating Callables – Coding
42 Example 3 – Delegating Iterators
43 Iterating Collections – Lecture
44 Reversed Iteration – Lecture
45 Reversed Iteration – Coding
46 Caveat Using Iterators as Function Arguments
47 Iterating Collections – Coding
48 Iterators – Lecture
49 Iterators – Coding
50 Iterators and Iterables – Lecture
51 Iterators and Iterables – Coding
52 Example 1 – Consuming Iterators Manually
53 Example 2 – Cyclic Iterators

Project 2
54 Project Description
55 Project Solution Goal 1
56 Project Solution Goal 2

Generators
57 Introduction
58 Yield From – Lecture
59 Yield From – Coding
60 Yielding and Generator Functions – Lecture
61 Yielding and Generator Functions – Coding
62 Example – Fibonacci Sequence
63 Making an Iterable from a Generator – Lecture
64 Making an Iterable from a Generator – Coding
65 Example – Card Deck
66 Generator Expressions and Performance – Lecture
67 Generator Expressions and Performance – Coding

Project 3
68 Project Description
69 Project Solution Goal 1
70 Project Solution Goal 2

Iteration Tools
71 Introduction
72 Chaining and Teeing – Lecture
73 Chaining and Teeing – Coding
74 Mapping and Reducing – Lecture
75 Mapping and Reducing – Coding
76 Zipping – Lecture
77 Zipping – Coding
78 Grouping – Lecture
79 Grouping – Coding
80 Combinatorics – Lecture
81 Combinatorics – Coding (Product)
82 Aggregators – Lecture
83 Combinatorics – Coding (Permutation, Combination)
84 Aggregators – Coding
85 Slicing – Lecture
86 Slicing – Coding
87 Selecting and Filtering – Lecture
88 Selecting and Filtering – Coding
89 Infinite Iterators – Lecture
90 Infinite Iterators – Coding

Project 4
91 Project – Description
92 Project Solution Goal 1
93 Project Solution Goal 2
94 Project Solution Goal 3
95 Project Solution Goal 4

Context Managers
96 Introduction
97 The contextmanager Decorator – Lecture
98 The contextmanager Decorator – Coding
99 Nested Context Managers
100 Context Managers – Lecture
101 Context Managers – Coding
102 Caveat when used with Lazy Iterators
103 Not just a Context Manager
104 Additional Uses – Lecture
105 Additional Uses – Coding
106 Generators and Context Managers – Lecture
107 Generators and Context Managers – Coding

Project 5
108 Project – Description
109 Project Solution Goal 1
110 Project Solution Goal 2

Generators as Coroutines
111 Introduction
112 Sending Exceptions to Generators – Lecture
113 Sending Exceptions to Generators – Coding
114 Using Decorators to Prime Coroutines – Lecture
115 Using Decorators to Prime Coroutines – Coding
116 Yield From – Two-Way Communications – Lecture
117 Yield From – Two-Way Communications – Coding
118 Yield From – Sending Data – Lecture
119 Yield From – Sending Data – Coding
120 Yield From – Closing and Return – Lecture
121 Yield From – Closing and Return – Coding
122 Coroutines – Lecture
123 Yield From – Throwing Exceptions – Lecture
124 Yield From – Throwing Exceptions – Coding
125 Application – Pipelines – Lecture
126 Application – Pipelines – Pulling Data
127 Application – Pipelines – Pushing Data
128 Application – Pipelines – Broadcasting Data
129 Coroutines – Coding
130 Generator States – Lecture
131 Generator States – Coding
132 Sending to Generators – Lecture
133 Sending to Generators – Coding
134 Closing Generators – Lecture
135 Closing Generators – Coding

Project 6
136 Project Description
137 Project Solution


Download from Rapidgator

Download from Turbobit