Regardless can you shrink the command to one line?

```py
line = StringIO.StringIO(doc.lstrip()).readline()
```

or
```py
line = doc.lstrip().splitlines()[0]
```

Personally I think the second option is more readable.  Do beware that the two options differ in a final `'\n'` character.

In terms of timings, I don't think we need to worry about micro-optimizing this.

```
In [16]: doc = matplotlib.pyplot.plot.__doc__

In [17]: len(doc.splitlines())
Out[17]: 157

In [18]: %timeit line1 = StringIO.StringIO(doc.lstrip()).readline()
100000 loops, best of 3: 3.73 us per loop

In [19]: %timeit line2 = doc.lstrip().splitlines()[0]
10000 loops, best of 3: 23.1 us per loop
```