Message54269
Logged In: YES
user_id=42755
You are right, unicode strings work in dictionaries. I
should have checked, sorry. However, they don't work in
shelves, as the attached script will demonstrate. You get a
type error:
Traceback (most recent call last):
File "fail.py", line 7, in ?
x[a] = "arrrghhh"
File "/usr/lib/python2.3/shelve.py", line 130, in __setitem__
self.dict[key] = f.getvalue()
File "/usr/lib/python2.3/site-packages/__init__.py", line
120, in __setitem__
TypeError: String or Integer object expected for key,
unicode found
I am using Python 2.3.3 on Linux |
|
Date |
User |
Action |
Args |
2007-08-23 16:08:27 | admin | link | issue1036490 messages |
2007-08-23 16:08:27 | admin | create | |
|