ContinuumIO/datashape — pull request #43 by mrocklin (2014-04-15 03:14:54+00:00)
Title: Docstrings and syntax

I want to understand datashape. While going through it I added some doctests.

I also added some more controversial syntax. I'm happy to separate out the two if necessary.

Syntax, maybe controversial:

```Python
In [1]: from datashape import *

In [2]: ds = dshape('3 * int32')

In [3]: 3 * int32
Out[3]: dshape("3 * int32")

In [4]: Var() * int32
Out[4]: dshape("var * int32")

In [5]: 10 * ds
Out[5]: dshape("10 * 3 * int32")

In [6]: 10 * Var() * int32
TypeError: Only a measure can appear on the last position of a datashape, not Var()

In [7]: dshape([10, Var(), int32])
Out[7]: dshape("10 * var * int32")
```