Relation: a new standard (PEP) container?
Scott
scott.howard.james at gmail.com
Fri Jun 19 13:14:09 EDT 2015
We've been using a simple container implementation of a mathematical relation (https://simple.wikipedia.org/wiki/Relation_(mathematics)) (i.e. an invertible M:M mapping) for some time.
We've been waiting for many years (decades actually) to have this concept incorporated as a standard container in one of the modern programming languages so we could swap our code with a language-standard container. To further these efforts, we have decided to initiate a conversation with the python community on adding a relation as a standard Python container package.
Briefly the uses of a relation are:
- quickly finding the values/range associated with keys/domain (e.g. *inversion*)
- maintaining a unique relationship between keys and values,(e.g. *isomorphism* or *aliasing*)
- using keys to categorize (one-to-many) values (e.g. *partitioning*)
- associating two sets in an arbitrary/bipartite manner (e.g. *tagging*)
Below is a link to an implementation, including an ipython notebook with light exposition and some canonical examples. We'll also be presenting a poster at SciPy 2015. Let us know if this, or something like it, seems like a worthwhile addition to the standard Python distribution.
Thank you,
Scott James, James Larkin
scott.james at noblis.org
james.larkin at noblis.org
https://github.com/scott-howard-james/relate
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150619/40b27dc5/attachment.html>
More information about the Python-list
mailing list