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


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.1.zip (5.1 kB view details)

Uploaded Source

compares-0.1.1.tar.gz (2.8 kB view details)

Uploaded Source

Built Distribution

compares-0.1.1-py2-none-any.whl (3.5 kB view details)

Uploaded Python 2

File details

Details for the file compares-0.1.1.zip.

File metadata

  • Download URL: compares-0.1.1.zip
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for compares-0.1.1.zip
Algorithm Hash digest
SHA256 6c835e09ec77f602db1fbbd80d125332b7655f4fc678c135fab550e6392da7c3
MD5 e206b772ec68e3483b6bd6e7262efb4b
BLAKE2b-256 517033451426c49faca18a33e58155e7decce827da84bf92cae5e82352dd4e85

See more details on using hashes here.

File details

Details for the file compares-0.1.1.tar.gz.

File metadata

  • Download URL: compares-0.1.1.tar.gz
  • Upload date:
  • Size: 2.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for compares-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e707a208deeba21fb4ca6515b8c7867da19824709ea848c67c7d9306a54093d5
MD5 ccfbbc4ffb39af41604b61b3f6578df9
BLAKE2b-256 aa5473200ef4466cdf2e165904a741cfdff449c6b713286e6814f5075f389537

See more details on using hashes here.

File details

Details for the file compares-0.1.1-py2-none-any.whl.

File metadata

File hashes

Hashes for compares-0.1.1-py2-none-any.whl
Algorithm Hash digest
SHA256 4466ecab3f4e14fad66a20828db1cd3dc8860f83cb08026446b07f82ac1fa18e
MD5 4346738b5645f22dd10af80ba455cc6a
BLAKE2b-256 c6000891dd528eb71dea25c8b5fefb5c7ed279c97fa66158370a5b2c275f7e32

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page