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 | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
compares-0.1.0.zip
(4.2 kB
view details)
compares-0.1.0.tar.gz
(2.1 kB
view details)
File details
Details for the file compares-0.1.0.zip
.
File metadata
- Download URL: compares-0.1.0.zip
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9ff6e58c0ea04a90fcbe6a959bb6442f826cc61922a4354be28fe4d8bc2db07 |
|
MD5 | 8a20726a114d544471755db4bfe52fc2 |
|
BLAKE2b-256 | 0333854a6d0b95ed9fc70a8c325ba58f692f9b2e3b3b9f330835648809864e57 |
File details
Details for the file compares-0.1.0.tar.gz
.
File metadata
- Download URL: compares-0.1.0.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb165cd546d5b74a5bfb6e14931462c8b16dbafdb766ffbe65d5720f6961e455 |
|
MD5 | 1ab98d46aed0199d3e6152f923b0d70d |
|
BLAKE2b-256 | a3d8319273c3b3e49fa261111ed1c60e342581d3b42643cfe1b0213a12b10b7a |