Message301728
`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
``` |
|
Date |
User |
Action |
Args |
2017-09-08 20:54:57 | sam-s | set | recipients:
+ sam-s, vstinner, ezio.melotti |
2017-09-08 20:54:57 | sam-s | set | messageid: <1504904097.33.0.298088172041.issue31398@psf.upfronthosting.co.za> |
2017-09-08 20:54:57 | sam-s | link | issue31398 messages |
2017-09-08 20:54:57 | sam-s | create | |
|