viscid.bucket module¶
-
class
viscid.bucket.
Bucket
(ordered=False)[source]¶ Bases:
object
This is basically a glorified dict
It’s a convenient dict-like object if you want lots of keys for a given value.
Note
You can add non-hashable items, but this is poorly tested. When adding / removing non-hashable items (items, not handles) the comparison is done using the object’s id. This is fundamentally different than using an object’s __hash__, but it should be fairly transparent.
-
remove_item_by_handle
(handle)[source]¶ remove item by handle, raises KeyError if handle is not found
-