Python 3: Deep Dive (Part 1 - Functional)
4.8 (4,342 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
21,991 students enrolled

Python 3: Deep Dive (Part 1 - Functional)

Variables, Functions and Functional Programming, Closures, Decorators, Modules and Packages
4.8 (4,342 ratings)
Course Ratings are calculated from individual students’ ratings and a variety of other signals, like age of rating and reliability, to ensure that they reflect course quality fairly and accurately.
21,991 students enrolled
Created by Fred Baptiste
Last updated 8/2018
English
Current price: $139.99 Original price: $199.99 Discount: 30% off
5 hours left at this price!
30-Day Money-Back Guarantee
This course includes
  • 44.5 hours on-demand video
  • 2 articles
  • 168 downloadable resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
Training 5 or more people?

Get your team access to 4,000+ top Udemy courses anytime, anywhere.

Try Udemy for Business
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
Course content
Expand all 158 lectures 44:38:14
+ A Quick Refresher - Basics Review
10 lectures 02:22:54
The Python Type Hierarchy
05:51
Multi-Line Statements and Strings
21:49
Variable Names
11:00
Conditionals
07:38
Functions
12:27
The While Loop
14:25
Break, Continue and the Try Statement
10:24
The For Loop
17:20
Classes
40:17
+ Variables and Memory
14 lectures 03:01:45
Variables are Memory References
08:20
Reference Counting
14:21
Garbage Collection
26:38
Dynamic vs Static Typing
05:28
Variable Re-Assignment
04:48
Object Mutability
15:21
Function Arguments and Mutability
17:28
Shared References and Mutability
09:36
Variable Equality
14:22
Everything is an Object
13:58
Python Optimizations: Interning
09:13
Python Optimizations: String Interning
19:10
Python Optimizations: Peephole
20:08
+ Numeric Types
32 lectures 07:54:31
Integers: Data Types
18:06
Integers: Operations
24:25
Integers: Constructors and Bases - Lecture
29:34
Integers: Constructors and Bases - Coding
20:22
Rational Numbers - Lecture
14:26
Rationals Numbers - Coding
12:33
Floats: Internal Representations - Lecture
19:52
Floats: Internal Representations - Coding
04:56
Floats: Equality Testing - Lecture
18:42
Floats: Equality Testing - Coding
14:40
Floats: Coercing to Integers - Lecture
09:38
Floats: Coercing to Integers - Coding
05:03
Floats: Rounding - Lecture
25:21
Floats: Rounding - Coding
13:33
Decimals - Lecture
16:49
Decimals - Coding
10:26
Decimals: Constructors and Contexts - Lecture
10:05
Decimals: Constructors and Contexts - Coding
10:28
Decimals: Math Operations - Lecture
09:32
Decimals: Math Operations - Coding
13:30
Decimals: Performance Considerations
10:29
Complex Numbers - Lecture
11:28
Complex Numbers - Coding
14:16
Booleans
20:59
Booleans: Truth Values - Coding
14:47
Booleans: Precedence and Short-Circuiting - Lecture
21:10
Booleans: Precedence and Short-Circuiting - Coding
13:37
Comparison Operators
20:53
+ Function Parameters
18 lectures 04:05:16
Argument vs Parameter
03:43
Positional and Keyword Arguments - Lecture
13:04
Positional and Keyword Arguments - Coding
06:21
Unpacking Iterables - Lecture
13:00
Unpacking Iterables - Coding
21:09
*args - Lecture
06:00
*args - Coding
11:47
Keyword Arguments - Lecture
09:23
Keyword Arguments - Coding
14:18
**kwargs
10:28
Putting it all Together - Lecture
13:25
Putting it all Together - Coding
17:25
Application: A Simple Function Timer
19:08
Parameter Defaults - Beware!!
18:44
Parameter Defaults - Beware Again!!
19:22
+ First-Class Functions
18 lectures 05:18:53
Docstrings and Annotations - Lecture
15:58
Docstrings and Annotations - Coding
15:02
Lambda Expressions - Coding
14:59
Lambdas and Sorting
15:56
Challenge - Randomize an Iterable using Sorted!!
02:55
Function Introspection - Lecture
19:30
Function Introspection - Coding
28:35
Callables
14:46
Map, Filter, Zip and List Comprehensions - Lecture
21:42
Map, Filter, Zip and List Comprehensions - Coding
21:14
Reducing Functions - Lecture
25:51
Reducing Functions - Coding
21:10
Partial Functions - Lecture
11:12
Partial Functions - Coding
25:32
The operator Module - Lecture
15:34
The operator Module - Coding
32:43
+ Scopes, Closures and Decorators
21 lectures 08:34:18
Global and Local Scopes - Lecture
34:54
Global and Local Scopes - Coding
15:40
Nonlocal Scopes - Lecture
22:17
Nonlocal Scopes - Coding
14:36
Closures - Lecture
38:35
Closures - Coding
32:04
Closure Applications - Part 1
15:37
Closure Applications - Part 2
18:40
Decorators (Part 1) - Lecture
21:06
Decorators (Part 1) - Coding
20:58
Decorator Application (Timer)
35:16
Decorator Application (Logger, Stacked Decorators)
23:46
Decorator Application (Memoization)
29:14
Decorators (Part 2) - Lecture
11:44
Decorators (Part 2) - Coding
25:57
Decorator Application (Decorator Class)
09:40
Decorator Application (Decorating Classes)
48:23
Decorator Application (Dispatching) - Part 1
31:45
Decorator Application (Dispatching) - Part 2
35:45
Decorator Application (Dispatching) - Part 3
26:50
+ Tuples as Data Structures and Named Tuples
11 lectures 03:31:18
Tuples as Data Structures - Lecture
19:01
Tuples as Data Structures - Coding
25:24
Named Tuples - Lecture
27:48
Named Tuples - Coding
35:13
Named Tuples - Modifying and Extending - Lecture
14:25
Named Tuples - Modifying and Extending - Coding
21:46
Named Tuples - DocStrings and Default Values - Lecture
13:30
Named Tuples - DocStrings and Default Values - Coding
15:46
Named Tuples - Application - Returning Multiple Values
06:22
Named Tuples - Application - Alternative to Dictionaries
28:45
+ Modules, Packages and Namespaces
16 lectures 05:43:11
What is a Module?
24:30
How does Python Import Modules?
49:32
Imports and importlib
27:39
Import Variants and Misconceptions - Lecture
13:59
Import Variants and Misconceptions - Coding
27:03
Reloading Modules
18:29
Using __main__
27:01
Modules Recap
13:02
What are Packages? - Lecture
20:24
What are Packages ? - Coding
27:11
Why Packages?
13:07
Structuring Packages - Part 1
36:41
Structuring Packages - Part 2
27:27
Namespace Packages
10:37
Importing from Zip Archives
03:28
+ Extras
15 lectures 03:47:12
Python 3.6 - Preserved Order of kwargs and Named Tuple Application
05:32
Python 3.6 - Underscores in Numeric Literals
03:38
Python 3.6 - f-Strings
09:19
Random: Seeds
17:26
Random Choices
26:07
Random Samples
07:02
Timing code using *timeit*
16:17
Don't Use *args and **kwargs Names Blindly
07:35
Command Line Arguments
01:00:07
Sentinel Values for Parameter Defaults
11:02
Simulating a simple switch in Python
19:00
Requirements
  • 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.)
Description

Hello!

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.

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 (below)  - 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!


Course Prerequisites

This is an intermediate to advanced Python course.

To have the full benefit of this course you should be comfortable with the basic Python language including:

  • variables and simple types such as str , bool , int  and float  types

  • for  and while  loops

  • if...else...  statements

  • using simple lists , tuples , dictionaries  and sets

  • defining functions (using the def  statement)

  • writing simple classes using the class  keyword and the __init__  method, writing instance methods, creating basic properties using @property decorators

  • importing modules from the standard library (e.g. import math)


You should also:

  • have Python 3.6 (or higher) installed on your system

  • be able to write and run Python programs using either:

    • the command line, or

    • a favorite IDE (such as PyCharm),

  • have Jupyter Notebooks installed (which I use throughout this course so as to provide you fully annotated Python code samples)

Who this course is for:
  • 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.