Back to Browse

Python Classes - Class Customization and Rich Comparison Methods with Code Example - APPFICIAL

2.2K views
Nov 11, 2021
5:30

Class customization allows you to define how a class behaves for specific operations such as printing or accessing attributes Customize classes by creating instances methods using special method names (double underscores) Rich comparison methods overload some common comparison operators. They allow you to overload the logical operators. Rich comparison method / Overloaded operator __lt__(self, other) / Less than __le__(self, other) / Less than or equal-to __gt__(self, other) / Greater than __ge__(self, other) / Greater than or equal-to __eq__(self, other) / Equal to (==) __ne__(self, other) / Not equal to (!=) Subscribe to Appficial for more programming videos coming soon. Also, don't forget to click LIKE and comment on the video if it helped you out!

Download

1 formats

Video Formats

360pmp48.2 MB

Right-click 'Download' and select 'Save Link As' if the file opens in a new tab.

Python Classes - Class Customization and Rich Comparison Methods with Code Example - APPFICIAL | NatokHD