Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why the keys are converted to string? #4

Open
ecarreras opened this issue Feb 15, 2014 · 5 comments
Open

Why the keys are converted to string? #4

ecarreras opened this issue Feb 15, 2014 · 5 comments

Comments

@ecarreras
Copy link

Python dict:

d = {}
d[1] = 'test'
{1: 'test'}

With RedisDict:

d = RedisDict('foo', conn)
d[1] = 'test'
{'1': 'test'}
@Fluxx
Copy link
Contributor

Fluxx commented Feb 16, 2014

This appears to just be an oversight. The zookeeper dict also has this same problem. I'll look at fixing this over the weekend.

@turicas
Copy link

turicas commented Feb 17, 2014

I developed a library that looks like durabledict, but it's focused on MongoDB: mongodict.

I solved these problems using tests from the Python source code (the mapping protocol). Maybe adding this file to your test suite will help discovering these problems.

@Fluxx
Copy link
Contributor

Fluxx commented Jul 21, 2014

As a heads up I'll be working on this library today, improving the serialization/deserialization configurability and support - so I should be able to fix this issue and a few others.

@xrmx
Copy link
Contributor

xrmx commented Nov 26, 2015

This is slightly more annoying in python3 where you use an unicode string as key and you get back a byte string.

@gordol
Copy link

gordol commented Aug 31, 2018

it's 2018, is this dead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants