From the course: Python for JavaScript Developers
Objects in Python vs. JavaScript - Python Tutorial
From the course: Python for JavaScript Developers
Objects in Python vs. JavaScript
- [Instructor] There's a lot to be learned when it comes to object-oriented Python. This chapter aims to give you just enough to get started. At the end of this chapter, we'll also dive into some application code. So JavaScript support what we call a prototypal inheritance model. Up until recently, there was no class syntax, that's been added with ES6. And a class may only extend one other class, which may then extend another class so you can achieve multiple extensions by chaining classes. In Python, classes are objects, and their instances are object as well. Python supports multiple inheritance, and the method resolution order determines where the methods are inherited from. Python's dictionaries are key-value structures that syntactically resemble JavaScript objects. They're not 100% interchangeable though. So, let's dive into some concepts that you can use in your Python. These concepts will also serve you when you use some of the most popular open source frameworks and libraries in the Python ecosystem.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.