New submission from Florent Xicluna:

from Cookie import SimpleCookie

cookie = SimpleCookie()
cookie[u'apple'] = u'green'
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File 
"/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/Cookie.py",
 line 592, in __setitem__
    self.__set(key, rval, cval)
  File 
"/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/Cookie.py",
 line 585, in __set
    M.set(key, real_value, coded_value)
  File 
"/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/Cookie.py",
 line 459, in set
    if "" != translate(key, idmap, LegalChars):
  File 
"/usr/local/Cellar/python/2.7.5/Frameworks/Python.framework/Versions/2.7/lib/python2.7/string.py",
 line 493, in translate
    return s.translate(table, deletions)
TypeError: translate() takes exactly one argument (2 given)



The documentation don't say it's not supported.
And the error TypeError seems not appropriate.

----------
components: Library (Lib)
messages: 189595
nosy: flox
priority: normal
severity: normal
status: open
title: cannot assign unicode keys to SimpleCookie
type: behavior
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue18012>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to