Traits (Mixins) to give +,/,-,* to MutableMapping
Project description
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 : http://github.com/jul/parseweblog
- 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}
Resource
Ticketing: https://github.com/jul/archery/issues?state=open Source: https://github.com/jul/archery Latest documentation: http://archery.readthedocs.org/en/latest/index.html
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 Distribution
archery-0.1.1.tar.gz
(6.5 kB
view details)
File details
Details for the file archery-0.1.1.tar.gz.
File metadata
- Download URL: archery-0.1.1.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
024433d7023a9a8f8c213b20f6cc4bb8accdb5031dadb6717d99529ccfe6d8dd
|
|
| MD5 |
915860f1bae5970248ee9ddcfcc62f5a
|
|
| BLAKE2b-256 |
9f4ef26fda54ea89d4cd49d0e67258ad84a41acff982340d939847061485ad9e
|