-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
Description
The use case came up when I tried to do this:
# conn is a valid StrictRedis instance
keys = conn.keys('namespace:*') # this returns a list
conn.delete(keys) # does not delete all the keys in the list
conn.delete(*keys) # raises ResponseError: wrong number of arguments for 'del' command
# edit: conn.delete(*keys) works when the list is not empty
Can we make it a bit neater to allow delete to just accept a list or a set of strings (keys) to do the necessary check to be passed to execute_command('DEL', ...)?