Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

A module that multiplexes interactions with lists of python objects.

Project Description

Mulpyplexer is a piece of code that can multiplex interactions with lists of python objects. It’s easier to show you:

import mulpyplexer

class A:
def __init__(self, i):
self.i = i
def add(self, j):
return A(self.i + (j.i if isinstance(j, A) else j))
def sub(self, j):
return A(self.i - (j.i if isinstance(j, A) else j))
def __repr__(self):
return “<A %d>” % self.i
def str(self):
return str(self.i)
def __eq__(self, o):
return self.i == o.i

one = mulpyplexer.MP([ A(10), A(20), A(30) ])

two = one.add(5) assert two.mp_items == [ A(15), A(25), A(35) ]

three = two.sub(10) assert three.mp_items == [ A(5), A(15), A(25) ]

four = three.add(one) assert four.mp_items == [ A(15), A(35), A(55) ]

five = four.str() assert five.mp_items == [ “15”, “35”, “55” ]

six = four.i assert six.mp_items == [ 15, 35, 55 ]

Release History

Release History

This version
History Node

0.08

History Node

0.07

History Node

0.06

History Node

0.05

History Node

0.04

History Node

0.03

History Node

0.02

History Node

0.01

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
mulpyplexer-0.08.tar.gz (2.1 kB) Copy SHA256 Checksum SHA256 Source Aug 10, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting