Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

Traits (Mixins) to give +,/,-,* to MutableMapping

Project description


It is an enhancement of MutableMapping based on Traits (Mixins). It makes dict addition therefore possible.

It currently only offers:

  • addition;
  • substraction;
  • multiplication;
  • division.

Quick Example

dict with addition used here :
It instanciate like a dict::
>>> from archery.bow import Hankyu
>>> a = Hankyu(x=1,y=2,z=2)
It adds :) ::
>>> a+a
{'y': 4, 'x': 2, 'z': 4}
>>> a+-2
{'y': 0, 'x': -1, 'z': 0}
>>> a+.5
{'y': 2.5, 'x': 1.5, 'z': 2.5}
>>> .5+a
{'y': 2.5, 'x': 1.5, 'z': 2.5}

What’s new

  • py3 compliance;
  • install is blocked if tests are failing with pip
  • install is blocked if tests are failing with easy_install

Project details

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
archery-0.1.5.tar.gz (10.4 kB) Copy SHA256 hash SHA256 Source None Sep 3, 2012

Supported by

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