Sollicitatievraag bij DuPont

What is operator overloading in python?

Antwoord op sollicitatievraag

Anoniem

21 mrt 2017

The operators are actually methods defined in respective classes. Defining methods for operators is known as operator overloading. For e.g. To use + operator with custom objects you need to define a method called __add__ .