In this video, I have discussed about nested classes in python
00:00 - Introduction
00:45 - Nested class
01:23 - Example
08:42 - Implementation in Jupyter Notebook
#nestedclass #python #parnikatutorials
Social media Links:
Website: www.parnikatutorials.in
Email id: parnikatutorials@gmail.com
To get the regular updates:
Telegram link: https://t.me/Parnikatutorials
Facebook: https://m.facebook.com/profile.php?id...
Linkedin: / parnika-tutorials-a8a9831b2
Pinterest: / parnikatutorials0892
Instagram: / parnikatutorials
Playlists:
Virtual Coffee with Jagadeesh: • VIRTUAL COFFEE WITH JAGADEESH
Digital Logic: • ABOUT PARNIKA TUTORIALS
Computer Organization and Architecture: • ABOUT PARNIKA TUTORIALS
C Programming: • L 1: WHAT IS AN ALGORITHM AND CHARACTERIST...
Data Structures: • L 1: Uncover the Benefits of Linked List: ...
Theory of Computation: • ABOUT PARNIKA TUTORIALS
Compiler Design: • ABOUT PARNIKA TUTORIALS
Operating Systems: • PROCESS STATE DIAGRAM | LONG TERM, SHORT T...
Databases: • ABOUT PARNIKA TUTORIALS
Computer Networks: • ABOUT PARNIKA TUTORIALS
For GATE PYQs and much more explore: / parnikatutorials
A Python is an Object-Oriented Programming Language, everything in python is related to objects, methods, and properties. A class is a user-defined blueprint or a prototype, which we can use to create the objects of a class. The class is defined by using the class keyword.
A class defined in another class is known as inner class or nested class. If an object is created using child class means inner class then the object can also be used by parent class or root class. A parent class can have one or more inner class but generally inner classes are avoided.
We can make our code even more object oriented by using inner class. A single object of the class can hold multiple sub-objects. We can use multiple sub-objects to give a good structure to our program.
For the grouping of two or more classes. Suppose we have two classes remote and battery. Every remote needs a battery but battery without remote won’t be used. So, we make the Battery an inner class to the Remote. It helps us to save code.
With the help of the inner class or nested class, we can hide the inner class from the outside world. Hence, Hiding the code is another good feature of the inner class.
By using the inner class, we can easily understand the classes because the classes are closely related. We do not need to search for classes in the whole code, they all are almost together.
Though inner or nested classes are not used widely in Python it will be a better feature to implement code because it is straight forward to organize when we use inner class or nested class.
In questa pagina del sito puoi guardare il video online L 62: INNER CLASS IN PYTHON | NESTED CLASS IN PYTHON | PYTHON COURSE FOR BEGINNERS della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Parnika Tutorials 07 dicembre 2021, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 820 volte e gli è piaciuto 30 spettatori. Buona visione!