Closed
Description
The following sequence of commands poses a problem for redis-py
. It is a reduction of a real sequence of commands invoked by a copy script I wrote, and needless to say, figuring out the behavior in the comments confused me mightily.
from redis import Redis
source = Redis(db=0) # source opens a new connection to localhost/0
dest = Redis(db=0) # dest uses the existing connection to localhost/0
source.select(1) # since source and dest are sharing a connection,
# they will now both operate on database 1
copy(source, dest) # doesn't accomplish anything useful!
Metadata
Metadata
Assignees
Labels
No labels