la icon indicating copy to clipboard operation
la copied to clipboard

fails on unicode keys

Open jmcloughlin opened this issue 10 years ago • 0 comments

In [36]: io['d'] = la.lrange(10)

In [37]: io.keys()
Out[37]: [u'a', u'b', u'c/d/e', u'd']

In [38]: io[u'd'] = la.lrange(10)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-38-f8e32d2df27c> in <module>()
----> 1 io[u'd'] = la.lrange(10)

/home/jmcl/devel/la/la/io.pyc in __setitem__(self, key, value)
    180         # Make sure the data looks OK before saving
    181         if type(key) != str:
--> 182             raise TypeError('key must be a string of type str.')
    183         if not isinstance(value, larry):
    184             raise TypeError('value must be a larry.')

TypeError: key must be a string of type str.

jmcloughlin avatar Jul 09 '14 22:07 jmcloughlin