Implementing Custom Sequences and Mappings in Python — LearnFlat
⏱ 2 ч 54 мин 📚 29 уроков 🎧 Аудиоверсия

Implementing Custom Sequences and Mappings in Python

Master the Python Data Model to create robust, reusable container classes that behave exactly like built-in lists and dictionaries.

  • 💬 ИИ инструктор
    Задавайте вопросы по любому уроку — понятный ответ придёт мгновенно, в любой момент.
  • 🕐 Начните в любое время
    Без расписаний и дедлайнов — учитесь в своём темпе, когда удобно.
  • 🌐 На русском языке
    Уроки, задания и сертификат — всё полностью на вашем языке.

О курсе

Standard Python lists and dictionaries are powerful, but sometimes you need a specialized container that enforces unique rules, provides validation, or integrates seamlessly with external data sources. This course teaches you how to leverage Python's powerful Data Model (the dunder methods) to design your own custom containers that feel completely native, supporting indexing, slicing, iteration, and the len() function out of the box. What you'll learn: * Understand the fundamental concepts of Python's Data Model and special methods (dunder methods). * Implement all necessary methods, including __len__ and __getitem__, to build custom sequence types. * Apply Abstract Base Classes (ABCs) from collections.abc to ensure custom containers adhere to standard Python protocols. * Design custom mapping classes that support key-value assignment, deletion, and iteration like standard dictionaries. * Practice creating immutable containers and specialized, fixed-size data structures for enhanced data integrity. * Configure custom container classes to support iteration and generator patterns efficiently. We begin by reviewing core object-oriented concepts and the role of special methods in defining object behavior. We then move step-by-step through implementing sequence protocols, focusing on indexing, slicing, and iteration. Finally, we tackle the complexities of mapping protocols (dictionary-like behavior) and how to use Python's Abstract Base Classes to validate your designs. This course is designed for beginner and intermediate Python programmers who understand basic classes and want to deepen their knowledge of Python's object model and create highly reusable, native-feeling code. No advanced knowledge of data structures is required. Start reading today and transform how you handle complex data modeling in Python.

Что вы получите

  • 📜 Сертификат об окончании
    Добавьте в профиль LinkedIn
  • 💬 Личный AI-наставник
    Застрял на уроке? Спроси встроенного наставника о чём угодно, в любой момент.
  • 🎧 Аудиоверсия включена
    Учитесь в дороге — экран не нужен
  • ♾️ Пожизненный доступ
    Возвращайтесь в любое время, без срока
  • 📱 Телефон или компьютер
    Работает везде и на любом устройстве
  • 💸 Возврат в течение 14 дней
    Без вопросов
  • Кратко и по делу
    2 ч 54 мин практического материала

Отзывы

Отзывов пока нет — поделитесь своим первым.

Написать отзыв

После отправки попросим войти — черновик сохранится.

Часто спрашивают

Что нужно для прохождения курса? +

Только смартфон или компьютер с доступом в интернет. Никаких установок и оборудования.

Как оплатить? +

Банковской картой через Stripe. Данные карты обрабатывает Stripe — мы их не храним.

Можно ли вернуть деньги? +

Да — полный возврат в течение 14 дней, без вопросов.

Как долго будут доступны материалы? +

Навсегда. После покупки курс остаётся с вами — возвращайтесь в любое время.

Получу ли я сертификат? +

Да. По окончании выдаётся сертификат, который можно добавить в профиль LinkedIn.

Подходит для специалистов в
IT Дизайн Финансы Маркетинг Медицина Образование HoReCa Производство