The Anatomy of a Python Class

Samuel Farrens

Programming Python Skills python

See in schedule: Tue, Jul 27, 09:30-11:00 CEST (90 min)

Classes are one of the fundamental building blocks of Python and are essential for object-oriented programming. In this tutorial we will explore how classes work and look at tips and tricks for getting the most out of them. By the end you should have, not only a much better understanding of what Python classes are, but also some new ideas for writing better code.

This first part of the tutorial presents some introductory and intermediate topics. The focus being on an intimate understanding of how classes work in Python.
- Methods
- Properties
- Operator overloading

The second part of the tutorial introduces some slightly more advanced topics.
- Inheritance
- Composition
- Abstract Classes

Some fun exercises are scattered throughout the tutorial to keep things interesting.

The tutorial is aimed as intermediate Python users but should also be accessible to beginners.

Please read the instructions on the accompanying GitHub repository before joining this session: https://github.com/sfarrens/The-Anatomy-of-a-Python-Class

Type: Training (180 mins); Python level: Intermediate; Domain level: Beginner


Samuel Farrens

CosmoStat, CEA Paris-Saclay

I am a researcher at the CosmoStat group in the astrophysics department of CEA Paris-Saclay. I work on the development of scientific software for the analysis of astronomical images using statistical techniques such as convex optimisation and machine learning.

Find out more about the things I do on my website: https://sfarrens.github.io