Grokking Advanced Python
Vote

0% completed

​

Course Overview

Error Handling and Debugging

Advanced Python Concepts

Object-Oriented Programming in Python

Functional Programming

Regular Expressions

File Handling

Concurrency and Parallelism

Networking

Python Miscellaneous

This course builds on Grokking Python Fundamentals and covers the parts of Python that larger programs depend on. Each chapter covers one area of the language and ends with a quiz. Most lessons include code examples that you can run and change in the browser.

The chapters are described below in the order you will take them.

Error Handling and Debugging

This chapter explains how Python reports a problem while a program runs, and how your code can respond. You will catch exceptions with try, except, and finally, and raise built-in and custom exceptions. You will also use assertions to check your assumptions. The chapter ends with three ways to find bugs: print statements, logging, and the pdb debugger.

Advanced Python Concepts

This chapter introduces four tools that make everyday code shorter and safer. The collections module adds specialized containers like Counter, defaultdict, and deque. The itertools module builds iterators for tasks like listing every combination of items. Decorators add behavior to a function without changing its code. Context managers make sure that a resource like an open file is released after use.

Object-Oriented Programming in Python

This chapter shows how to model data with classes and objects. It covers constructors, class methods, static methods, inheritance, polymorphism, abstraction, and encapsulation. You will also learn the naming conventions Python uses for private attributes. The chapter closes with packages, enumerations, and reflection, which is the ability of a program to inspect and change its own objects while it runs.

Functional Programming

This chapter covers a style of programming in which functions take other functions as arguments or return them as results. You will write lambda functions and use map, filter, and reduce. You will also learn how iterators and generators produce values one at a time instead of building a whole list in memory.

Regular Expressions

This chapter teaches you how to describe a text pattern. You will then use the re module to search for that pattern, extract it, or replace it.

File Handling

This chapter covers reading and writing text files and renaming and deleting files. It also covers creating, listing, and removing directories.

Concurrency and Parallelism

This chapter explains how to run more than one task at a time. It covers threads, the locks that keep threads from interfering with each other, and the asyncio module for asynchronous code. It also explains the global interpreter lock (GIL). The GIL allows only one thread to run Python code at a time, which limits how much threads can speed up a program.

Networking

This chapter shows how programs communicate over a network. You will write a client and a server with sockets. You will also fetch web pages and split URLs into their parts with the urllib package.

Python Miscellaneous

The last chapter covers standard library tools that most programs need at some point: dates and times, the math module, closures, text templates, and JSON. It ends with generics, which use type hints to describe functions and classes that work with many data types.

By the end of the course, you will be able to read and write Python of the kind found in production code. You will also know which part of the standard library to use when a task involves errors, files, threads, or network access.

Reading Progress

0%


Vote for new content

On This Page

Error Handling and Debugging

Advanced Python Concepts

Object-Oriented Programming in Python

Functional Programming

Regular Expressions

File Handling

Concurrency and Parallelism

Networking

Python Miscellaneous