Making classes support comparison operations in Python

This lesson is a recipe from the Python Cookbook that explores being able to compare instances of your class using the standard comparison operators, but without having to write a lot of special methods, and avoiding the tedious task of creating implementations of every possible comparison operator....

Full description

Bibliographic Details
Main Authors: Jones, Brian K., Beazley, David M. (Author)
Format: eBook
Language:English
Published: [Place of publication not identified] O'Reilly 2016
Subjects:
Online Access:
Collection: O'Reilly - Collection details see MPG.ReNa
LEADER 01910nmm a2200277 u 4500
001 EB001932538
003 EBX01000000000000001095440
005 00000000000000.0
007 cr|||||||||||||||||||||
008 210123 ||| eng
050 4 |a QA76.73.P98 
100 1 |a Jones, Brian K. 
245 0 0 |a Making classes support comparison operations in Python 
260 |a [Place of publication not identified]  |b O'Reilly  |c 2016 
300 |a 1 volume  |b illustrations 
653 |a Python (Computer program language) / fast 
653 |a Python (Computer program language) / http://id.loc.gov/authorities/subjects/sh96008834 
653 |a Python (Langage de programmation) 
700 1 |a Beazley, David M.  |e author 
740 0 2 |a Python cookbook 
041 0 7 |a eng  |2 ISO 639-2 
989 |b OREILLY  |a O'Reilly 
500 |a Description based on online resource; title from cover (viewed February 20, 2017). - From Python cookbook, third edition, by Brian K. Jones and David Beazley. Cf. Cover. - Date of publication from resource description page 
856 4 0 |u https://learning.oreilly.com/library/view/~/9781491965276/?ar  |x Verlag  |3 Volltext 
082 0 |a 000 
520 |a This lesson is a recipe from the Python Cookbook that explores being able to compare instances of your class using the standard comparison operators, but without having to write a lot of special methods, and avoiding the tedious task of creating implementations of every possible comparison operator. What you'll learn--and how you can apply it Learn how to use the functools.total_ordering decorator to simplify the comparison operator creation process. This lesson is for you because... You're an experienced Python programmer who wants to compare instances of your class using standard comparison operators without having to write a lot of special methods. Prerequisites Moderate experience with Python Materials or downloads needed None