From the course: Transition from C# to Python

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Defining classes and methods

Defining classes and methods

From the course: Transition from C# to Python

Start my 1-month free trial

Defining classes and methods

- [Narrator] Just like C-Sharp, Python is an object oriented language. You can define classes, build inheritance hierarchies, define properties and methods, and so on just like you can in C-Sharp. In this chapter, we're going to see how to use Python's object oriented features. And we'll start by learning how Python defines classes and instantiates objects. And then we'll see how inheritance works in Python, along with how to use the abstract classes module to build abstract classes. Now Python does not directly support some C-Sharp features like interfaces. But you can accomplish the same thing by using abstract classes, and we'll see how to do that. And then we'll wrap up with an investigation of Python, so called magic methods that are available on all Python objects. So let's open up the C-Sharp code for this example. And that's going to be in the defining classes folder here in chapter three. In the C-Sharp…

Contents