Skip to content

Update raises ValueError when given an empty dictionary #12

@kwzrd

Description

@kwzrd

Passing an empty dictionary to RedisCache.update produces a ValueError from inside the aioredis dependency.

This is inconsistent with the behaviour of a Python dictionary:

>>> d = {"A": 1}
>>> d.update({})
>>> d
{'A': 1}

If this is intended, it should be documented, as the update method's docstring can be misleading:

This works exactly like dict.update from a normal dictionary.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions