- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Base Overloading Methods in Python
Following table lists some generic functionality that you can override in your own classes −
Sr.No. | Method, Description & Sample Call |
---|---|
1 | __init__ ( self [,args...] ) Constructor (with any optional arguments) Sample Call : obj = className(args) |
2 | __del__( self ) Destructor, deletes an object Sample Call : del obj |
3 | __repr__( self ) Evaluable string representation Sample Call : repr(obj) |
4 | __str__( self ) Printable string representation Sample Call : str(obj) |
5 | __cmp__ ( self, x ) Object comparison Sample Call : cmp(obj, x) |
- Related Articles
- What are base overloading methods in Python?
- Overloading Varargs Methods in Java
- Overloading Operators in Python
- How does Overloading Operators work in Python?
- Hiding of all overloaded methods in base class in C++
- How do I use method overloading in Python?
- How will you explain Python Operator Overloading?
- Overloading in C#
- Dictionary Methods in Python
- List Methods in Python?
- Overriding Methods in Python
- Constructor Overloading in C#
- Constructor overloading in Java
- Method overloading in Java
- Overloading in java programming

Advertisements