Python 1.0.1 is now available using conda (on Unix, because this version of Python does not support Windows). This blog post explains how easy it is to create a Python 1.0 environment and some of the features of this Python version.
A few days ago, I read a blog post about Python 1.0 and decided to try to create conda packages for this Python version. It turned out to be quite simple, and conda packages are now available in the standard Anaconda package repository. If you have either Anaconda or Miniconda installed, you can use the following command to create a Python 1.0 environment:
$ conda create -n py10 python=1.0
Note that this is not going to change the Python version in your root environment. Instead, a new environment, named
py10, is created. Installing Python 1.0 into your root conda environment would be possible, but doing so would break conda itself (and probably most other Python packages as well), as conda does not support Python 1.0.
Before conda, it had been challenging to handle multiple versions of Python on your system. Now, many conda users create conda environments which contain either Python 2 or Python 3, see my previous post.
Let’s take a look at what you can do with Python 1.0:
Python 1.0.1 (Mar 26 2014)
Copyright 1991-1994 Stichting Mathematisch Centrum, Amsterdam
>>> import sys
‘1.0.1 (Mar 26 2014)’
>>> f = lambda x: x*x
lambda functions are already supported in this 20 year old version of Python. The date shown is when the interpreter was compiled, not when it was released (which was on February 15, 1994). This is not the first version of Python, but the first version which I could get compiled for Linux and Mac OS X.
Here is a list of things we found worth noting:
- there are 71 (pure Python) modules in the standard library, compared to 205 in Python 2.7
- C extension modules, such as
math, are all built-in, as opposed to
.soextensions, which are dynamically loaded
- functions do not support keyword arguments
- complex literals are not supported
- no readline! try pressing up-arrow… awww
sys.maxint + 1raises an OverflowError, because it does not implicitly convert to longints
objectare all undefined
__builtins__symbol does not exist
- does not locate the standard library using
os.pyas a landmark file, but hard codes the directory at build-time
- no support of triple quotes for strings
If you want to play with Python 1.0, conda is the way to go. You can install it into a separate environment, so it does not interfere with your existing Python.