Introduction to object-oriented programming in Python

Radoslaw Fabisiak
Duomly - Online School
9 min readAug 15, 2019

--

Duomly — programming online courses

This article was originally published at: https://www.blog.duomly.com/object-oriented-programming-in-python/

Python allows writing programs following several programming paradigms (like procedural programming, functional programming, object-oriented programming) and to combine them.

Object-oriented programming is one of the most widely used paradigms today. It is based on the use of objects — entities that contain data members called attributes and bounded functions (routines, procedures) called methods.

Objects are instances of classes. In other words, classes mostly define the structure of objects and serve as templates for creating them. Classes have methods definitions but can also contain data common for all their instances.

This article is about object-oriented programming in Python. It explains how to create classes and use them to instantiate their objects. In particular, it covers the following:

  • Creating Python classes
  • Data attributes
  • Instance methods
  • Properties
  • Class and static methods
  • Inheritance

This article doesn’t cover all the details on these topics. There are also many other aspects…

--

--