New submission from sds:

`in` and `has_key` have different behavior for Unicode keys for `gdbm` in 2.7:
```
>>> import gdbm
>>> db = gdbm.open("foo.gdbm","c")
>>> db.has_key("a")
0
>>> db.has_key(u"a")
0
>>> "a" in db
False
>>> u"a" in db
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: gdbm key must be string, not unicode
```

----------
components: Unicode
messages: 301728
nosy: ezio.melotti, haypo, sam-s
priority: normal
severity: normal
status: open
title: TypeError: gdbm key must be string, not unicode
type: behavior
versions: Python 2.7

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

Reply via email to