NeuralAcademy
CoursesLearning PathsAI AgentsPromptsAI ToolsWorkflowsResourcesPlaygroundCommunityLiveBlogLeaderboardCategoriesInstructorsPricingAboutContact
Sign inGet started
Python Intermediate
Module 4
Lesson 3 of 4
04.03 · OOP and protocols

Protocols and duck typing

AI-generated
Lesson content · AI-crafted

My notes

Sign in to jot down private notes as you learn.

15/24
Course outline
Module 1
Modern Python essentials
4
  • 01.01Setting up Python 3.10+ and venv
  • 01.02f-strings, unpacking and walrus
  • 01.03Type hints and mypy basics
  • 01.04Reading tracebacks like a pro
Module 2
Data structures & comprehensions
4
  • 02.01List, dict and set comprehensions
  • 02.02Tuples, namedtuples and dataclasses
  • 02.03Generators and lazy iteration
  • 02.04collections and itertools you actually use
Module 3
Functions, decorators and closures
4
  • 03.01*args, **kwargs and keyword-only args
  • 03.02Closures and late binding
  • 03.03Writing your first decorator
  • 03.04functools: lru_cache, partial, wraps
Module 4
OOP and protocols
4
  • 04.01Classes, dunder methods and __repr__
  • 04.02Inheritance vs composition
  • 04.03Protocols and duck typing
  • 04.04ABCs and when to use them
Module 5
IO, errors and async
4
  • 05.01Context managers and the with statement
  • 05.02Exceptions, custom errors and re-raising
  • 05.03async / await fundamentals
  • 05.04asyncio.gather and running tasks concurrently
Module 6
Projects, tests and tooling
4
  • 06.01Packages, __init__.py and imports
  • 06.02uv / pip and pinning dependencies
  • 06.03Testing with pytest and fixtures
  • 06.04Capstone: refactor a script into a package
NeuralAcademy

The training academy for AI engineers. Ship real AI products.

Learn

  • All courses
  • AI Agents
  • LLMs
  • RAG

Academy

  • Instructors
  • Pricing
  • FAQ
  • Contact

Legal

  • Terms
  • Privacy
  • Cookies

© 2026 NeuralAcademy. All rights reserved.

Built for the AI-native engineer.

Edit with