pydata/pandas — pull request #4459 by danbirken (2013-08-04 19:10:44+00:00)
Title: BUG: Fix Panel instance variable namespace issue GH3440

The change is minor but so easy I thought I'd submit it: If you switch the list comprehensions to generators, it sidesteps leaking the temporary variables into the class variable scope.

This will be microscopically slower, but they are just class variables so it really doesn't matter.

https://travis-ci.org/danbirken/pandas/builds/9836459

```
import numpy as np
from pandas import DataFrame, Panel

df0 = DataFrame(np.zeros([3,4]))
df1 = DataFrame(np.ones([3,4]))

p = Panel({'a':df0, 'b':df1})

In [1]: p.a
Out[1]:
0 1 2 3
0 0 0 0 0
1 0 0 0 0
2 0 0 0 0

In [2]: p.b
Out[2]:
0 1 2 3
0 1 1 1 1
1 1 1 1 1
2 1 1 1 1
```