Économisez sur les compétences qui vous font briller avec 40 % de réduction sur 3 mois de Coursera Plus. Économisez maintenant

Ce cours n'est pas disponible en Français (France)

Nous sommes actuellement en train de le traduire dans plus de langues.
Packt

Python Data Model

Inclus avec Coursera Plus

Obtenez un aperçu d'un sujet et apprenez les principes fondamentaux.
niveau Intermédiaire

Expérience recommandée

2 semaines à compléter
à 10 heures par semaine
Planning flexible
Apprenez à votre propre rythme
Obtenez un aperçu d'un sujet et apprenez les principes fondamentaux.
niveau Intermédiaire

Expérience recommandée

2 semaines à compléter
à 10 heures par semaine
Planning flexible
Apprenez à votre propre rythme

Ce que vous apprendrez

  • Implement custom object behaviors using Python’s data model protocols.

  • Use special methods to manage object representation, creation, and deletion.

  • Build dictionary-like custom objects with iterable behavior.

  • Master custom numeric operators and implement complex math operations.

Détails à connaître

Certificat partageable

Ajouter à votre profil LinkedIn

Récemment mis à jour !

mai 2026

Évaluations

9 devoirs

Enseigné en Anglais

Découvrez comment les employés des entreprises prestigieuses maîtrisent des compétences recherchées

 logos de Petrobras, TATA, Danone, Capgemini, P&G et L'Oreal

Il y a 8 modules dans ce cours

In this module, we will explore the essential building blocks of Python's data model, focusing on object creation, initialization, and how to represent objects in custom ways. You’ll also learn to control object deletion behavior using the __del__ method. These foundational skills will help you create flexible and reusable Python classes.

Inclus

6 vidéos

In this module, we will dive into how custom objects can behave like built-in containers, such as lists or dictionaries. You'll learn to make your objects iterable and give them the ability to store and manipulate items like a dictionary. This module will expand your Python class design skills by integrating custom data structures.

Inclus

3 vidéos1 devoir

In this module, we will cover how to make custom objects comparable, enabling equality checks and Boolean evaluations. You'll also learn how to define the ordering of objects, allowing them to be compared using greater than, less than, and equality operators. These comparisons make your objects more versatile and integrated with Python’s built-in systems.

Inclus

4 vidéos1 devoir

In this module, we will focus on enabling custom objects to perform arithmetic and bitwise operations. You’ll learn how to override operators like addition and subtraction to work with your own types. Additionally, we’ll explore customizing operations like modulo, powers, and bit-shifting, bringing your objects closer to behaving like numeric types.

Inclus

14 vidéos1 devoir

In this module, we will explore how to control and manipulate object attributes. You’ll learn how to intercept and customize the behavior when reading, setting, and deleting attributes. Additionally, we will cover descriptors and the property decorator, which allows you to add custom logic to your object’s attributes.

Inclus

4 vidéos1 devoir

In this module, we will explore how to make custom objects behave like functions. By using the __call__ method, you can turn your objects into callable entities, enabling dynamic and flexible design patterns. This skill is useful for when your objects need to function as both data structures and functional components.

Inclus

1 vidéo1 devoir

In this module, we will focus on using context managers in Python. You will learn how to define custom context managers using __enter__ and __exit__ to manage resources such as file handles or database connections. This will help you write cleaner, more efficient code for managing resources with automatic cleanup.

Inclus

1 vidéo1 devoir

In this module, we will cover the advanced topic of object serialization. You’ll learn how to copy objects effectively and explore the differences between shallow and deep copies. Additionally, you will learn how to use the pickle module to save and load objects, customizing the serialization process with __getstate__ and __setstate__. This will ensure your custom objects can be easily saved and restored.

Inclus

2 vidéos3 devoirs

Instructeur

Packt - Course Instructors
Packt
1 810 Cours512 664 apprenants

Offert par

Packt

Pour quelles raisons les étudiants sur Coursera nous choisissent-ils pour leur carrière ?

Felipe M.

Étudiant(e) depuis 2018
’Pouvoir suivre des cours à mon rythme à été une expérience extraordinaire. Je peux apprendre chaque fois que mon emploi du temps me le permet et en fonction de mon humeur.’

Jennifer J.

Étudiant(e) depuis 2020
’J'ai directement appliqué les concepts et les compétences que j'ai appris de mes cours à un nouveau projet passionnant au travail.’

Larry W.

Étudiant(e) depuis 2021
’Lorsque j'ai besoin de cours sur des sujets que mon université ne propose pas, Coursera est l'un des meilleurs endroits où se rendre.’

Chaitanya A.

’Apprendre, ce n'est pas seulement s'améliorer dans son travail : c'est bien plus que cela. Coursera me permet d'apprendre sans limites.’

Foire Aux Questions