This course will go beyond everyday Python to the techniques needed by experienced programmers and by library and framework developers.
What you'll learn
Over time, Python has exploded in popularity, from being an obscure scripting language to becoming one of the most popular, and widely used languages in the world.
In this Advanced Python tutorial, you'll learn advanced topics, a knowledge of which will set you apart from the greater number of Python developers.
- First, you'll explore how to gain fine-grained control over attribute access.
- Next, you'll discover how to intercept class-object construction.
- Finally, you'll learn the subtle, but powerful, controls Python gives you over class relationships.
Table of contents
- Advanced Python 7m
- Introducing Advanced Flow Control 1m
- Loop-else Clauses and While-else 3m
- While-else for Evaluating Stack Programs 7m
- For-else Clauses and Handling Search Failure 3m
- Alternatives to Loop-else Clauses 1m
- Try-else Clauses 1m
- Emulating Switch Statements 7m
- Dispatching on Type 7m
- Double Dispatch with Methods 3m
- Summary 3m
- Introducing Object Internals 1m
- How are Python Objects Represented? 5m
- Overriding __getattr__ 2m
- Overriding __setattr__ 1m
- Pitfalls with __getattr__ 3m
- Overriding __delattr__ 1m
- Customizing Attribute Storage 3m
- Direct vs. Indirect Access to __dict__ 1m
- Overriding __getattribute__ 4m
- Attribute Lookup for Special Methods 2m
- Where are Methods Stored? 2m
- Trading Size for Dynamism with Slots 4m
- Summary 2m
- Introducing Abstract Base Classes 4m
- Abstract Base Classes in Python 3m
- Abstract Base Classes in Practice 3m
- Non-transitive Subclass Relationships 2m
- Method Resolution with Virtual Base Classes 1m
- Library Support for Abstract Base Classes 2m
- Virtual Subclass Registration 1m
- Combining Subclass Detection and Registration 2m
- The ABC Convenience Base Class 1m
- Declaring Abstract Methods 3m
- Combining Method Decorators 2m
- Improving @invariant with ABCs 4m
- Summary 4m
You will learn advanced Python topics like descriptors, fine-grain controls over attribute access, metaclasses, virtual subclasses, and more. You will know enough Python to understand implementation of sophisticated frameworks like SQLAlchemy or Django.
You will need a functioning Python 3.5 or later development environment.