11/27/2023 0 Comments Super in oop pythonThe super() function in Python implements code reusability and modularity as there is no need for us to rewrite the whole function again and again.We can use the super() function with the single inheritance and multiple inheritances.This is because we don't have to specify the name of the parent class to access the methods present in it. We don't need to remember the parent's class name while using the super() function.Benefits of super() function:įollowing are the benefits of using a super() function in child class: The super() function we use in the child class returns a temporary created object of the superclass, that allow us to access all of its method present in the child class. While using the inheritance concept, we can refer to a parent class with the use of super() function inside the inherited or child class. Therefore, Python follows all the concepts of OOPs, and one of such concepts is inheritance. Python Tutorial Python Features Python History Python Applications Python Install Python Example Python Variables Python Data Types Python Keywords Python Literals Python Operators Python Comments Python If else Python Loops Python For Loop Python While Loop Python Break Python Continue Python Pass Python Strings Python Lists Python Tuples Python List Vs Tuple Python Sets Python Dictionary Python Functions Python Built-in Functions Python Lambda Functions Python Files I/O Python Modules Python Exceptions Python Date Python Regex Python Sending Email Read CSV File Write CSV File Read Excel File Write Excel File Python Assert Python List Comprehension Python Collection Module Python Math Module Python OS Module Python Random Module Python Statistics Module Python Sys Module Python IDEs Python Arrays Command Line Arguments Python Magic Method Python Stack & Queue PySpark MLlib Python Decorator Python Generators Web Scraping Using Python Python JSON Python Itertools Python Multiprocessing How to Calculate Distance between Two Points using GEOPY Gmail API in Python How to Plot the Google Map using folium package in Python Grid Search in Python Python High Order Function nsetools in Python Python program to find the nth Fibonacci Number Python OpenCV object detection Python SimpleImputer module Second Largest Number in PythonĪs we all know that, Python is an object-oriented programming language.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |