borgbackup / borgbackup/borghash

make api more python3-dict-like

Open
#13 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Cython
Stars
6
Forks
3
Avg merge
2h 31m
Merged PRs (30d)
6

Description

the current api is not quite like a dictionary, but rather like borgbackup's hashindex api is like.

considering that borgbackup has a wrapper class around borghash classes anyway, we can change borghash api to be more like python3 dict api.

maybe not implement everything, but **name** the frequently used stuff as usual:

- [X] `.iteritems` -> `.items`
- [X] `__init__`: make all special stuff pure kwargs
- [x] `.update`
- also implement `__iter__`, `.keys` and `.values`

Check:
- `collections.abc.Mapping`
- `collections.abc.MutableMapping` https://github.com/python/cpython/blob/3.13/Lib/_collections_abc.py#L924

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.