This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mok0
Recipients
Date 2004-09-28.20:58:40
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
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
History
Date User Action Args
2007-08-23 16:08:27adminlinkissue1036490 messages
2007-08-23 16:08:27admincreate