Skip to content

get_storage() is not a very complete implementation of dict() #118

@auspex

Description

@auspex

get_storage() doesn't implement some of the basic methods of a dictionary.

I haven't actually got to putting anything into the storage, yet, but on an empty storage:

    storage = plugin.get_storage('store')
    if storage:
        ...

results in:
TypeError: an integer is required
as does len(storage)

Also, it has no 'viewitems', 'fromkeys', 'viewvalues', '__cmp__', '__le__', 'has_key', 'viewkeys', '__gt__', '__lt__', 'copy', '__ge__' methods.

Most importantly, I need has_key — and contains() provides the correct functionality, so why not just implement has_key()?

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