Python 3: Deep Dive (Part 1 - Functional)
Course description
This is Part 1 of a series of courses intended to dive into the inner mechanics and more complicated aspects of Python 3. This is not a beginner course - if you've been coding Python for a week or a couple of months, you probably should keep writing Python for a bit more before tackling this series.
Read more about the course
On the other hand, if you're now starting to ask yourself questions like:
I wonder how this works?
is there another way of doing this?
what's a closure? is that the same as a lambda?
I know how to use a decorator someone else wrote, but how does it work? Can I write my own?
why isn't this boolean expression returning a boolean value?
what does an import actually do, and why am I getting side effects?
and similar types of question...
then this course is for you.
Please make sure you review the pre-requisites for this course - although I give a brief refresh of basic concepts at the beginning of the course, those are concepts you should already be very comfortable with as you being this course.
In this course series, I will give you a much more fundamental and deeper understanding of the Python language and the standard library.
Python is called a "batteries-included" language for good reason - there is a ton of functionality in base Python that remains to be explored and studied.
So this course is not about explaining my favorite 3rd party libraries - it's about Python, as a language, and the standard library.
In particular this course is based on the canonical CPython. You will also need Jupyter Notebooks to view the downloadable fully-annotated Python notebooks.
It's about helping you explore Python and answer questions you are asking yourself as you develop more and more with the language.
In Python 3: Deep Dive (Part 1) we will take a much closer look at:
Variables - in particular that they are just symbols pointing to objects in memory
Namespaces and scope
Python's numeric types
Python boolean type - there's more to a simple or statement than you might think!
Run-time vs compile-time and how that affects function defaults, decorators, importing modules, etc
Functions in general (including lambdas)
Functional programming techniques (such as map, reduce, filter, zip, etc)
Closures
Decorators
Imports, modules and packages
Tuples as data structures
Named tuples
To get the most out of this course, you should be prepared to pause the coding videos, and attempt to write code before I do! Sit back during the concept videos, but lean in for the code videos!
And after you have seen a code video, pause the course, and try things out yourself - explore, experiment, play with code, and see how things work (or don't work! - that's also a great way to learn!)
- Basic introductory knowledge of Python programming (variables, conditional statements, loops, functions, lists, tuples, dictionaries, classes).
- You will need Python 3.6 or above, and a development environment of your choice (command line, PyCharm, Jupyter, etc.)
- Anyone with a basic understanding of Python that wants to take it to the next level and get a really deep understanding of the Python language and its data structures.
- Anyone preparing for an in-depth Python technical interview.
What you'll learn:
- An in-depth look at variables, memory, namespaces and scopes
- A deep dive into Python's memory management and optimizations
- In-depth understanding and advanced usage of Python's numerical data types (Booleans, Integers, Floats, Decimals, Fractions, Complex Numbers)
- Advanced Boolean expressions and operators
- Advanced usage of callables including functions, lambdas and closures
- Functional programming techniques such as map, reduce, filter, and partials
- Create advanced decorators, including parametrized decorators, class decorators, and decorator classes
- Advanced decorator applications such as memoization and single dispatch generic functions
- Use and understand Python's complex Module and Package system
- Idiomatic Python and best practices
- Understand Python's compile-time and run-time and how this affects your code
- Avoid common pitfalls
Watch Online
All Course Lessons (158)
| # | Lesson Title | Duration | Access |
|---|---|---|---|
| 1 | 1.1. Course Overview Demo | 18:09 | |
| 2 | 2.1. Introduction | 01:44 | |
| 3 | 2.2. The Python Type Hierarchy | 05:52 | |
| 4 | 2.3. Multi-Line Statements and Strings | 22:52 | |
| 5 | 2.4. Variable Names | 11:01 | |
| 6 | 2.5. Conditionals | 07:39 | |
| 7 | 2.6. Functions | 12:28 | |
| 8 | 2.7. The While Loop | 14:26 | |
| 9 | 2.8. Break, Continue and the Try Statement | 10:25 | |
| 10 | 2.9. The For Loop | 17:21 | |
| 11 | 2.10. Classes | 40:18 | |
| 12 | 3.1. Introduction | 02:55 | |
| 13 | 3.2. Variables are Memory References | 08:22 | |
| 14 | 3.3. Reference Counting | 14:22 | |
| 15 | 3.4. Garbage Collection | 26:40 | |
| 16 | 3.5. Dynamic vs Static Typing | 05:29 | |
| 17 | 3.6. Variable Re-Assignment | 04:49 | |
| 18 | 3.7. Object Mutability | 15:23 | |
| 19 | 3.8. Function Arguments and Mutability | 17:29 | |
| 20 | 3.9. Shared References and Mutability | 09:37 | |
| 21 | 3.10. Variable Equality | 14:23 | |
| 22 | 3.11. Everything is an Object | 13:59 | |
| 23 | 3.12. Python Optimizations Interning | 09:15 | |
| 24 | 3.13. Python Optimizations String Interning | 19:12 | |
| 25 | 3.14. Python Optimizations Peephole | 20:10 | |
| 26 | 4.1. Introduction | 02:59 | |
| 27 | 4.2. Integers Data Types | 18:07 | |
| 28 | 4.3. Integers Operations | 24:26 | |
| 29 | 4.4. Integers Constructors and Bases - Lecture | 29:35 | |
| 30 | 4.5. Integers Constructors and Bases - Coding | 20:24 | |
| 31 | 4.6. Rational Numbers - Lecture | 14:27 | |
| 32 | 4.7. Rational Numbers - Coding | 12:34 | |
| 33 | 4.8. Floats Internal Representations - Lecture | 19:53 | |
| 34 | 4.9. Floats Internal Representations - Coding | 04:57 | |
| 35 | 4.10. Floats Equality Testing - Lecture | 18:43 | |
| 36 | 4.11. Floats Equality Testing - Coding | 14:41 | |
| 37 | 4.12. Floats Coercing to Integers - Lecture | 09:40 | |
| 38 | 4.13. Floats Coercing to Integers - Coding | 05:04 | |
| 39 | 4.14. Floats Rounding - Lecture | 25:22 | |
| 40 | 4.15. Floats Rounding - Coding | 13:34 | |
| 41 | 4.16. Decimals - Lecture | 16:50 | |
| 42 | 4.17. Decimals - Coding | 10:27 | |
| 43 | 4.18. Decimals Constructors and Contexts - Lecture | 10:06 | |
| 44 | 4.19. Decimals Constructors and Contexts - Coding | 10:29 | |
| 45 | 4.20. Decimals Math Operations - Lecture | 09:33 | |
| 46 | 4.21. Decimals Math Operations - Coding | 13:31 | |
| 47 | 4.22. Decimals Performance Considerations | 10:30 | |
| 48 | 4.23. Complex Numbers - Lecture | 11:29 | |
| 49 | 4.24. Complex Numbers - Coding | 14:17 | |
| 50 | 4.25. Booleans | 21:01 | |
| 51 | 4.26. Booleans Truth Values - Lecture | 09:09 | |
| 52 | 4.27. Booleans Truth Values - Coding | 14:48 | |
| 53 | 4.28. Booleans Precedence and Short-Circuiting - Lecture | 21:11 | |
| 54 | 4.29. Booleans Precedence and Short-Circuiting - Coding | 13:38 | |
| 55 | 4.30. Booleans Boolean Operators - Lecture | 18:01 | |
| 56 | 4.31. Booleans Boolean Operators - Coding | 14:46 | |
| 57 | 4.32. Comparison Operators | 20:54 | |
| 58 | 5.1. Introduction | 01:06 | |
| 59 | 5.2. Argument vs Parameter | 03:44 | |
| 60 | 5.3. Positional and Keyword Arguments - Lecture | 13:06 | |
| 61 | 5.4. Positional and Keyword Arguments - Coding | 06:22 | |
| 62 | 5.5. Unpacking Iterables - Lecture | 13:01 | |
| 63 | 5.6. Unpacking Iterables - Coding | 21:10 | |
| 64 | 5.7. Extended Unpacking - Lecture | 17:51 | |
| 65 | 5.8. Extended Unpacking - Coding | 29:05 | |
| 66 | 5.9. args - Lecture | 06:01 | |
| 67 | 5.10. args - Coding | 11:48 | |
| 68 | 5.11. Keyword Arguments - Lecture | 09:24 | |
| 69 | 5.12. Keyword Arguments - Coding | 14:19 | |
| 70 | 5.13. kwargs | 10:29 | |
| 71 | 5.14. Putting it all Together - Lecture | 13:26 | |
| 72 | 5.15. Putting it all Together - Coding | 17:26 | |
| 73 | 5.16. Application A Simple Function Timer | 19:09 | |
| 74 | 5.17. Parameter Defaults - Beware!! | 18:45 | |
| 75 | 5.18. Parameter Defaults - Beware Again!! | 19:23 | |
| 76 | 6.1. Introduction | 04:06 | |
| 77 | 6.2. Docstrings and Annotations - Lecture | 15:59 | |
| 78 | 6.3. Docstrings and Annotations - Coding | 15:03 | |
| 79 | 6.4. Lambda Expressions - Lecture | 12:10 | |
| 80 | 6.5. Lambda Expressions - Coding | 15:00 | |
| 81 | 6.6. Lambdas and Sorting | 15:57 | |
| 82 | 6.7. Challenge - Randomize an Iterable using Sorted!! | 02:56 | |
| 83 | 6.8. Function Introspection - Lecture | 19:31 | |
| 84 | 6.9. Function Introspection - Coding | 28:37 | |
| 85 | 6.10. Callables | 14:47 | |
| 86 | 6.11. Map, Filter, Zip and List Comprehensions - Lecture | 21:44 | |
| 87 | 6.12. Map, Filter, Zip and List Comprehensions - Coding | 21:15 | |
| 88 | 6.13. Reducing Functions - Lecture | 25:52 | |
| 89 | 6.14. Reducing Functions - Coding | 21:11 | |
| 90 | 6.15. Partial Functions - Lecture | 11:13 | |
| 91 | 6.16. Partial Functions - Coding | 25:33 | |
| 92 | 6.17. The operator Module - Lecture | 15:35 | |
| 93 | 6.18. The operator Module - Coding | 32:44 | |
| 94 | 7.1. Introduction | 01:32 | |
| 95 | 7.2. Global and Local Scopes - Lecture | 34:55 | |
| 96 | 7.3. Global and Local Scopes - Coding | 15:41 | |
| 97 | 7.4. Nonlocal Scopes - Lecture | 22:18 | |
| 98 | 7.5. Nonlocal Scopes - Coding | 14:38 | |
| 99 | 7.6. Closures - Lecture | 38:36 | |
| 100 | 7.7. Closures - Coding | 32:06 | |
| 101 | 7.8. Closure Applications - Part 1 | 15:38 | |
| 102 | 7.9. Closure Applications - Part 2 | 18:41 | |
| 103 | 7.10. Decorators (Part 1) - Lecture | 21:07 | |
| 104 | 7.11. Decorators (Part 1) - Coding | 20:59 | |
| 105 | 7.12. Decorator Application (Timer) | 35:17 | |
| 106 | 7.13. Decorator Application (Logger, Stacked Decorators) | 23:48 | |
| 107 | 7.14. Decorator Application (Memoization) | 29:15 | |
| 108 | 7.15. Decorator Factories - Lecture | 11:45 | |
| 109 | 7.16. Decorator Factories - Coding | 25:58 | |
| 110 | 7.17. Decorator Application (Decorator Class) | 09:41 | |
| 111 | 7.18. Decorator Application (Decorating Classes) | 48:24 | |
| 112 | 7.19. Decorator Application (Dispatching) - Part 1 | 31:46 | |
| 113 | 7.20. Decorator Application (Dispatching) - Part 2 | 35:46 | |
| 114 | 7.21. Decorator Application (Dispatching) - Part 3 | 26:51 | |
| 115 | 8.1. Introduction | 03:19 | |
| 116 | 8.2. Tuples as Data Structures - Lecture | 19:02 | |
| 117 | 8.3. Tuples as Data Structures - Coding | 25:25 | |
| 118 | 8.4. Named Tuples - Lecture | 27:50 | |
| 119 | 8.5. Named Tuples - Coding | 35:15 | |
| 120 | 8.6. Named Tuples - Modifying and Extending - Lecture | 14:26 | |
| 121 | 8.7. Named Tuples - Modifying and Extending - Coding | 21:47 | |
| 122 | 8.8. Named Tuples - DocStrings and Default Values - Lecture | 13:31 | |
| 123 | 8.9. Named Tuples - DocStrings and Default Values - Coding | 15:47 | |
| 124 | 8.10. Named Tuples - Application - Returning Multiple Values | 06:23 | |
| 125 | 8.11. Named Tuples - Application - Alternative to Dictionaries | 28:46 | |
| 126 | 9.1. Introduction | 03:03 | |
| 127 | 9.2. What is a Module | 24:31 | |
| 128 | 9.3. How does Python Import Modules | 49:33 | |
| 129 | 9.4. Imports and importlib | 27:40 | |
| 130 | 9.5. Import Variants and Misconceptions - Lecture | 14:01 | |
| 131 | 9.6. Import Variants and Misconceptions - Coding | 27:04 | |
| 132 | 9.7. Reloading Modules | 18:30 | |
| 133 | 9.8. Using __main__ | 27:02 | |
| 134 | 9.9. Modules Recap | 13:03 | |
| 135 | 9.10. What are Packages - Lecture | 20:25 | |
| 136 | 9.11. What are Packages - Coding | 27:12 | |
| 137 | 9.12. Why Packages | 13:08 | |
| 138 | 9.13. Structuring Packages - Part 1 | 36:42 | |
| 139 | 9.14. Structuring Packages - Part 2 | 27:28 | |
| 140 | 9.15. Namespace Packages | 10:39 | |
| 141 | 9.16. Importing from Zip Archives | 03:29 | |
| 142 | 10.1. Python 3.10 | 25:18 | |
| 143 | 10.2. Python 3.9 | 28:47 | |
| 144 | 10.3. Python 3.8 3.7 | 34:26 | |
| 145 | 10.4. Python 3.6 Highlights | 07:50 | |
| 146 | 10.5. Python 3.6 - Dictionary Ordering | 19:46 | |
| 147 | 10.6. Python 3.6 - Underscores in Numeric Literals | 03:39 | |
| 148 | 10.7. Python 3.6 - Preserved Order of kwargs and Named Tuple Application | 05:34 | |
| 149 | 10.8. Python 3.6 - f-Strings | 09:20 | |
| 150 | 11.1. Introduction | 03:41 | |
| 151 | 11.2. Additional Resources | 12:54 | |
| 152 | 11.3. Random Seeds | 17:27 | |
| 153 | 11.4. Random Choices | 26:08 | |
| 154 | 11.5. Random Samples | 07:03 | |
| 155 | 11.6. Timing code using timeit | 16:18 | |
| 156 | 11.7. Don't Use args and kwargs Names Blindly | 07:36 | |
| 157 | 11.8. Command Line Arguments | 01:00:08 | |
| 158 | 11.9. Sentinel Values for Parameter Defaults | 11:03 |
Unlock unlimited learning
Get instant access to all 157 lessons in this course, plus thousands of other premium courses. One subscription, unlimited knowledge.
Learn more about subscriptionBooks
Read Book Python 3: Deep Dive (Part 1 - Functional)
| # | Title |
|---|---|
| 1 | 1.1. Section 1 - Intro |
| 2 | 1.4. Python Deep Dive 1 |
| 3 | 2.1. Quick Refresher Introduction |
| 4 | 2.2. Python Type Hierarchy |
| 5 | 2.3. Multi-Line Statements and Strings |
| 6 | 2.4. Variable Names |
| 7 | 3.2. 02 - Variables are Memory References |
| 8 | 3.3. 03 - Reference Counting |
| 9 | 3.4. 04 - Garbage Collection |
| 10 | 3.5. 05 - Dynamic vs Static Typing |
| 11 | 3.6. 06 - Variable Re-Assignment |
| 12 | 3.7. 07 - Object Mutability |
| 13 | 3.8. 08 - Function Arguments and Mutability |
| 14 | 3.9. 09 - Shared References and Mutability |
| 15 | 3.10. 10 - Variable Equality |
| 16 | 3.11. 11 - Everything is an Object |
| 17 | 3.12. 12 - Python Optimizations - Interning |
| 18 | 3.13. 13 - Python Optimizations String Interning |
| 19 | 3.14. 14 - Python Optimizations - Peephole |
| 20 | 4.2. 02 - Integers Data Type |
| 21 | 4.3. 03 - Integers - Operations |
| 22 | 4.4. 04 - Integers - Constructors and Bases |
| 23 | 4.6. 06 - Rational Numbers |
| 24 | 4.8. 08 - Floats - Internal Representation |
| 25 | 4.10. 10 - Floats - Equality Testing |
| 26 | 4.12. 12 - Floats to Integers |
| 27 | 4.14. 14 - Floats - Rounding |
| 28 | 4.16. 16 - Decimals |
| 29 | 4.18. 18 - Decimals - Constructors and Contexts |
| 30 | 4.20. 20 - Decimals - Math Operations |
| 31 | 4.22. 22 - Decimals - Performance Considerations |
| 32 | 4.23. 23 - Complex Numbers |
| 33 | 4.25. 25 - Booleans |
| 34 | 4.26. 26 - Booleans - Truth Values - Lecture |
| 35 | 4.28. 28 - Boolean - Precedence and Short-Circuiting |
| 36 | 4.30. 30 - Boolean - Boolean Operators |
| 37 | 4.32. 32 - Comparison Operators |
| 38 | 5.2. 02 - Argument vs Parameter |
| 39 | 5.3. 03 - Positional Arguments |
| 40 | 5.5. 05 - Unpacking Iterables |
| 41 | 5.7. 07 - Extended Unpacking |
| 42 | 5.9. 09 - star-args |
| 43 | 5.11. 11 - Keyword Arguments |
| 44 | 5.13. 13 - kwargs |
| 45 | 5.14. 14 - Putting it all together |
| 46 | 5.17. 17 - Default Values |
| 47 | 6.2. 02 - Docstrings and Annotations |
| 48 | 6.4. 04 - Lambda Expressions |
| 49 | 6.8. 08 - Function Introspection |
| 50 | 6.10. 10 - Callables |
| 51 | 6.11. 11 - Map, Filter, Zip |
| 52 | 6.13. 13 - Reducing Functions |
| 53 | 6.15. 15 - Partial Functions |
| 54 | 6.17. 17 - The operator Module |
| 55 | 7.2. 02 - Global and Local Scopes |
| 56 | 7.4. 04 - NonLocal Sopes |
| 57 | 7.6. 06 - Closures |
| 58 | 7.10. 10 - Decorators 1 |
| 59 | 7.15. 15 - Decorators 2 |
| 60 | 8.2. 02 - Tuples |
| 61 | 8.4. 04 - Named Tuples |
| 62 | 8.6. 06 - Named Tuples - Modifying and Extending |
| 63 | 8.8. 08 - Named Tuples - DocStrings and Default Values |
| 64 | 9.5. 05 - Import Variants |
| 65 | 9.9. 08 - Modules Recap |
| 66 | 9.10. 09 - What are Packages |
| 67 | 9.12. 11 - Why Packages |
| 68 | 9.15. 14 - Namespace Packages |
| 69 | 11.2. Additional Resources |
Comments
0 commentsWant to join the conversation?
Sign in to commentSimilar courses
Deployment from Scratch
Build an LLM-powered Q&A App using LangChain, OpenAI and Python
Fullstack Flask: Build a Complete SaaS App with Flask
Python - The Practical Guide