Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Libraries

    funktown 0.4.6

    Download button

    No screenshots available
    Downloads: 148  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Zhehao Mao | More programs
    MIT/X Consortium Lic... / FREE
    February 20th, 2012, 20:31 GMT
    ROOT / Programming / Libraries

     Read user reviews (0)  Refer to a friend  Subscribe

    funktown description

    Functional Data Structures for Python

    funktown is a Python library that implements an efficient ImmutableDict and ImmutableVector class inspired by the implementation of Vectors and Maps in the Clojure programming language.

    Installation

    If you are installing from the cloned repository, just use

    python setup.py install

    Package is also available from PyPI. In that case, use

    pip install funktown

    ArchLinux users can install from the AUR

    yaourt -S python2-funktown
    yaourt -S python-funktown
    # python 3 version

    API

    ImmutableVector

    The constructor takes a list of initial values. It supports standard list operations such as item access, slicing, and concatenation.

    assoc(index, value)

    Returns a new vector with the value assigned to the given index

    conj(value)

    Returns a new vector with the value appended to the back. Roughly equivalent to vec.assoc(len(vec), value)

    pop()

    Returns a new vector with the final item removed.

    ImmutableDict

    The constructor can take a dict and/or keyword arguments. Item access follows the same behavior as builtin python dicts.

    assoc(key, value)

    Returns a new immutable dict with the value associated with the given key.

    get(key)

    Like in Python's builtin dict, this will act like item access, except returning None instead of raising a KeyError.

    remove(key)

    Return a new ImmutableDict with the item at that key removed

    update(otherdict)

    Return a new immutable dict updated with the records in otherdict.

    Compatiblity

    Funktown has been tested with Python 2.7.2 and 3.2.2 on a Linux system. It should be compatible with all python versions greater than 2.6.


    Product's homepage

    Requirements:

    · Python

      


    TAGS:

    data structures | Python library | Python | data | structures

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM