When to use a class in Python

Published: 02 March 2026
on channel: Python Morsels
966
38

While you don't often need to make your own classes in Python, they can sometimes make your code reusable and easier to read.

Article version of this video available at https://pym.dev/when-are-classes-used/

00:00 Using classes because a framework requires it
00:43 Passing the same data into multiple functions
01:12 Creating a custom class
02:15 Using a class to convey the purpose of data
02:38 Using classes to improve readability

#Python


On this page of the site you can watch the video online When to use a class in Python with a duration of hours minute second in good quality, which was uploaded by the user Python Morsels 02 March 2026, share the link with friends and acquaintances, this video has already been watched 966 times on youtube and it was liked by 38 viewers. Enjoy your viewing!