===================================
Compatibility with Python versions.
===================================

Theano is compatible with Python versions >= 2.6 including 3.x series.
This guide provides coding guidelines on how to maintain
comnpatibility.


Installation (2to3 and setup.py)
--------------------------------


Python code compatibility
-------------------------------------


Compatibility package (theano.compat)
.....................................

Compatibility between 2.x and 3.x is implemented using six_, a Python
2 and 3 compatibility library by Benjamin Peterson.  A copy of six_
library is included in theano.compat package, but it should not be
called directly.  Instead, use symbols exposed at the package level.

Correct:

::

   from theano.compat import b

Incorrect:

::

   from theano.compat.six import b 

::

   from six import b

Strings, bytes and unicode
..........................



C code compatibility
--------------------

Module initialization
.....................

PyCapsule and PyCObject
.......................



References
----------

.. _six: http://pythonhosted.org/six
