Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (
Help us improve Python packaging - Donate today!

Easily define object comparisons on a list of attributes

Project Description

Compares is a module that defines a single decorator, compares.via, which removes some boilerplate around defining __eq__, __ne__ and __repr__ for object comparisons and display.

It takes advantage of the fact that there is often a set of relevant attributes (fields) which should be used to compare instances.

It is inspired by twisted.python.util.FancyEqMixin.

Release History

Release History

This version
History Node


History Node


Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
compares-0.1.1-py2-none-any.whl (3.5 kB) Copy SHA256 Checksum SHA256 2.7 Wheel Jul 13, 2014
compares-0.1.1.tar.gz (2.8 kB) Copy SHA256 Checksum SHA256 Source Jul 13, 2014 (5.1 kB) Copy SHA256 Checksum SHA256 Source Jul 13, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting