This library provides support for working with immutable data in Python.

The term "immutable" is used in a stricter sense than in the Python
standard library, where an immutable object is any object whose
elements and/or attributes cannot be modified. The stricter
interpretation of immutability used here also requires that the values
of all elements and attributes of an immutable object must be
immutable as well. An immutable object in this stricter sense thus
contains no modifiable state at all, it is a pure value.

The support for working with immutable data consists of:

1) A base class immutable.Immutable of which any immutable
   object is an instance. New classes for immutable objects
   are implemented subclassing immutable.Immutable. Such objects
   can be initialized normally by providing an __init__ method.
   After __init__ has been executed, no modification of the
   object's attributes are possible. After initialization, the
   base class verifies that the values of all attributes of the
   object are immutable as well.

2) Immutable versions of some standard collections:
   - immutable.ImmutableTuple
   - immutable.ImmutableSet
   - immutable.ImmutableDict
   The elements of these collections must themselves be immutable.
   After initialization, no modification is possible.

3) A utility function immutable.immutable that converts any nested
   structure of Python collections to an equivalent immutable structure.

4) A module immutable.np that provides an immutable variant of NumPy
   arrays. The available constructor functions are immutable.np.array,
   immutable.np.arange, immutable.np.ones, immutable.np.zeros,
   immutable.np.ones_like and immutable.np.zeros_like.

The main goal of this library is to allow experimentation with
immutable values in Python. The current implementations for immutable
collections are probably not efficient enough for many applications.
Completely new C-level implementations of persistent data structure
would be required for maximum efficiency.

This library works with both Python 2 (tested with 2.6 and 2.7)
and Python 3. The Python 3 version has been generated from the Python 2
version using the utility 2to3.


Konrad Hinsen
Centre de Biophysique Moléculaire (CNRS)
and Synchrotron Soleil
E-Mail: konrad.hinsen@cnrs-orleans.fr
