Skip to content

Easy way to get number of entries in index #194

@adamjstewart

Description

@adamjstewart

I would like to be able to easily query the number of entries in an index. I would expect len(index) to work. However, the __len__ attribute isn't defined. I recently discovered index.get_size(), which gives me exactly what I want, although it isn't documented. Could we rename get_size to __len__, or have __len__ call get_size? Alternatively, could we document get_size?

I'm happy to open a PR to do this, but it'll have to wait until next week.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions