Skip to main content

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.

Project details


Release history Release notifications

This version
History Node

0.1.1

History Node

0.1.0

Download files

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

Filename, size & hash SHA256 hash help File type Python version Upload date
compares-0.1.1-py2-none-any.whl (3.5 kB) Copy SHA256 hash SHA256 Wheel 2.7 Jul 13, 2014
compares-0.1.1.tar.gz (2.8 kB) Copy SHA256 hash SHA256 Source None Jul 13, 2014
compares-0.1.1.zip (5.1 kB) Copy SHA256 hash SHA256 Source None Jul 13, 2014

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page