Mô tả

Welcome to the best resource online and the only one you need to learn and master object-oriented programming with modern python!

There has never been a better time to learn python. It is consistently ranked in the top 3 most in-demand and most-loved programming languages in the world, with applications in machine learning, web development, data science, automation, game development, and much more. And its growth shows no signs of stopping.

But while there are plenty of resources to learn the basics of python, it is quite difficult to move past those to the intermediate and advanced facets of the language. This course seeks to address that.

Over more than 20 hours of detailed lectures, live coding, and guided projects we will unpack everything that python has to offer, starting from absolute scratch. We will master not only object-oriented python and how to use it, but in the process also gain an understanding of the python data model and the essence of writing pythonic code.

Every five to ten lectures we will stop and practice what we have covered, as we work through a list of detailed requirements and convert that to an object-oriented solution using nothing by zero-dependencies, pure python.

––––– Structure & Curriculum –––––

The curriculum is organized around three parts of increasing target proficiency.

In the first, we will cover the essential foundations of working with classes in python, defining our own types, customizing them using dunders, exposing managed attributes through properties and effectively using inheritance.

· Classes

· Dunders

· Properties

· Inheritance

Having established that core foundation, in the next five sections, we will dive into more advanced topics that effective python developers rely on. These include modern features like dataclasses, enumerations and slots but also more established, pivotal constructs like descriptors and exceptions.

· Slots

· Dataclasses

· Descriptors

· Enumerations

· Exceptions

Then in the final four sections we will take a look under the hood at how python recognizes and works with types. We will explore, practice and implement several patterns including duck typing, dynamic protocols and abstract base classes. Finally, we will look at the internal machinery that produces classes in python, as we turn our attention to class metaprogramming.

· Dynamic Protocols

· Abstract Base Classes

· Multiple Inheritance

· Class Metaprogramming

This course is intended for anyone who is committed to mastering object-oriented programming with python, regardless of prior experience, which is why a full-length bonus introduction to the python programming language is included to get anyone up and running writing pythonic code in no time.

I hope you commit to joining me in this journey as we take your python to the next level. See you inside!

Bạn sẽ học được gì

Learn Python object-oriented programming from the ground up with in-depth lectures and practice activities

Work through 16 detailed project assignments to put your learning to practice

Write your own classes with customized behavior, representation, and relationships

Understand inheritance and multiple inheritance including best practices and the ideal use cases

Understand modern language constructs like dataclasses, enumerations, slots, and more

Master the Pythonic style of working with types, built-ins, and their derivatives

Get a deep understanding of the more difficult parts including descriptors, abstract base classes and metaprogramming

Create your own version of data structures with special behaviour, e.g. a list that sorts itself, or a dictionary that never raises KeyError

Work effectively with the exceptions and define your own separate exception hierarchies

Yêu cầu

  • A computer (Windows/Mac/Linux). That's all!
  • Prepare to write thousands of lines of Python code
  • No prior knowledge of python is required

Nội dung khoá học

15 sections

Introduction

2 lectures
Introduction
04:28
All Course Resources
00:13

Classes

21 lectures
Section Intro
00:51
PEP8
02:26
Our First Class
03:47
Class State
03:36
Methods And Behaviour
07:10
Instance Attributes
06:31
Alternatively: getattr() And setattr()
07:47
Revisting self
05:36
Skill Challenge #1
02:59
Solution
06:21
Class and Static Methods
05:42
BONUS: An Alternative Syntax
03:29
Dunder Dict
04:38
Class vs Instance __dict__
07:37
BONUS: Careful With Mutables
07:51
Access Control
05:51
Docstrings
07:24
Skill Challenge #2
03:54
Solution
21:26
Quick Gotcha
04:32
Section Resources
00:06

Dunders

22 lectures
Section Intro
01:21
Let's Add A __repr__
04:39
__repr__ vs __str__
10:14
__format__
08:01
Object Equality
09:28
BONUS: Non-Equality
03:09
Hashing and Mutability
07:03
Hashable Book
06:43
BONUS: Hashing Gotcha
04:18
Skill Challenge #3
06:07
Solution
15:20
Other Rich Comparisons
09:55
A Better Way
07:19
Truthiness
03:39
BONUS: Truth Value Testing Via __len__
05:39
Container Classes
06:55
Pythonic Add
10:08
The __getitem__ Magic
09:43
Defining Our Own Magics
04:20
Skill Challenge #4
08:42
Solution
17:12
Section Resources
00:06

Properties

19 lectures
Section Intro
01:10
Loyal Customers
03:04
Always Start Plain
03:11
A Refactor
08:06
Private And Mangled Attributes
06:53
Breaking Changes
11:23
Properties Live In The Class
04:40
Skill Challenge #5
04:14
Solution
09:59
Decorator Syntax
08:18
BONUS: Decorators Refresher
14:55
Read or Write Only Properties
06:03
Managed Attributes
06:09
BONUS: Caching Average Review
05:04
Deleting Properties
05:15
Property Docstrings
04:50
Skill Challenge #6
05:32
Solution
16:26
Section Resources
00:06

Inheritance

18 lectures
Section Intro
01:00
Inheritance
06:34
What Is Inheritance Good For?
12:14
All Classes Inherit From object
06:55
Method Resolution Order
07:37
Subclass Overrides
10:08
Better Parent Delegation: super()
05:28
Subclass __init__
09:14
Skill Challenge #7
06:33
Solution
19:57
Subclassing Properties
11:51
Extending Built-ins
05:48
Another Example
07:59
Beware The Pitfalls
08:51
Beyond Inheritance
03:26
Skill Challenge #8
05:18
Solution
10:25
Section Resources
00:06

Slots

11 lectures
Section Intro
00:50
Instance Data Storage Review
05:16
Slots
05:56
Class Residents
04:25
BONUS: Demonstrating The Memory Advantage
07:38
Inheriting Slots
07:26
Something To Avoid
03:01
Should We Always Use Slots?
02:53
Skill Challenge #9
03:43
Solution
14:56
Section Resources
00:06

Dataclasses

16 lectures
Section Intro
00:43
The Why
09:37
An Alternative: namedtuple
08:29
BONUS: A Quick Point On Immutability
04:08
BONUS: Typed NamedTuple
04:24
Dataclasses
04:33
Batteries Included
11:22
Type Hints
06:25
Customizing Fields
09:16
BONUS: Further Customization
08:36
Immutability
09:36
Inheritance
04:54
Why Not Just Namedtuples?
09:26
Skill Challenge #10
08:39
Solution
12:54
Section Resources
00:06

Descriptors

15 lectures
Section Intro
01:00
Attribute Lookup Chain Review
09:17
The Descriptor Protocol
03:08
Using A Descriptor
12:04
Descriptor Storage
08:25
Even Better: Instance Storage
10:47
Using __set_name__
03:21
Tying Up Loose Ends
08:35
Non-Data Descriptors
06:57
Aren't Properties Just Better?
08:52
BONUS: Similar How?
03:59
Skill Challenge #11
03:43
Solution
08:30
Refactored Solution
07:30
Section Resources
00:06

Enums

16 lectures
Section Intro
01:08
What's The Point?
05:48
Enumerations
06:26
Members
05:16
Aliases vs Masters
05:28
Uniqueness
05:35
BONUS: Functional Syntax
05:49
Automatic Values
06:45
Customizing Next Values
08:20
Extensibility
07:44
Flags
06:05
Bitmasks
12:56
BONUS: How Bitwise Works
10:39
Skill Challenge #12
07:10
Solution
19:32
Section Resources
00:06

Exceptions

14 lectures
Section Intro
01:20
The Exception Object
07:04
Handling
05:54
Raising
06:09
EAFP
09:33
What's Up With SyntaxError?
07:09
Exception Hierarchy
09:48
The Else Clause
07:23
Finally
11:43
Nesting And Bundling
08:13
Rolling Our Own
04:41
Skill Challenge #13
03:57
Solution
26:46
Section Resources
00:06

Dynamic Protocols

13 lectures
Section Intro
00:59
Python Is Dynamically Typed
04:53
Duck Typing
10:20
Protocols
08:52
The Making Of A Sequence
09:13
ZooFavorites
11:34
Pythonic Slicing
15:22
BONUS: From Iteration To Iterables And Iterators
07:53
BONUS: The Iterator Protocol
09:29
BONUS: Extreme Duck Typing
06:29
Skill Challenge #14
13:46
Solution
27:37
Section Resources
00:06

Abstract Base Classes

12 lectures
Section Intro
01:08
Duck Typing May Be Enough
01:32
Type Checking Refresher
06:49
Abstract Base Classes
13:55
BONUS: When Should We Create Our Own?
03:19
Standard Lib ABCs
11:49
A Quick Look Under The Hood
08:15
Skill Challenge #15
04:57
Solution
21:43
Refactored Solution
12:59
Re-refactored Solution
04:54
Section Resources
00:06

Multiple Inheritance

14 lectures
Section Intro
01:30
It Makes Sense
03:21
Sharing Behaviour
05:13
Parent __init__()
07:35
Revisiting super()
09:35
Variadics
12:51
The Diamond Problem
04:34
What Drives __mro__?
08:44
Worth It?
03:26
Mixins
07:00
Organizing Interfaces
11:00
Skill Challenge #16
09:09
Solution
24:30
Section Resources
00:06

Class Metaprogramming

11 lectures
Section Intro
01:35
What Is Meta?
03:22
Classes Are Objects
06:58
type() As Class Factory
08:35
BONUS: More On Dynamic Class Creation
11:09
Defining Our Own Metaclass
07:06
Inside The Belly Of The Monster
11:16
Exhibit A: Zero Instance Classes And Singletons
09:06
Exhibit B: Enforcing Unique Method Names
13:24
Deeper Magic Than 99%
02:00
Section Resources
00:06

Appendix A - A Brief Introduction To Python

27 lectures
Welcome
00:12
Data Types
02:35
Arithmetic And Augmented Assignment Operators
07:16
Ints And Floats
08:54
Booleans And Comparison Operators
05:12
Strings
07:52
Methods
06:29
Containers I - Lists
06:08
Lists vs. Strings
06:53
List Methods And Functions
07:54
Containers II - Tuples
04:43
Containers III - Sets
10:32
Containers IV - Dictionaries
05:15
Dictionary Keys And Values
08:14
Membership Operators
04:28
Controlling Flow - if, else, And elif
08:21
Truth Value Of Non-booleans
03:28
For Loops
05:05
The range() Immutable Sequence
05:10
While Loops
05:55
Break And Continue
04:15
Zipping Iterables
03:39
List Comprehensions
07:47
Defining Functions
10:19
Function Arguments - Positional vs Keyword
06:54
Lambdas
05:28
Importing Modules
05:38

Đánh giá của học viên

Chưa có đánh giá
Course Rating
5
0%
4
0%
3
0%
2
0%
1
0%

Bình luận khách hàng

Viết Bình Luận

Bạn đánh giá khoá học này thế nào?

image

Đăng ký get khoá học Udemy - Unica - Gitiho giá chỉ 50k!

Get khoá học giá rẻ ngay trước khi bị fix.