Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BunchBunch, OrderedBunch, DefaultBunch, ProxyBunch #61

Open
dsc opened this issue Oct 19, 2024 · 0 comments
Open

BunchBunch, OrderedBunch, DefaultBunch, ProxyBunch #61

dsc opened this issue Oct 19, 2024 · 0 comments
Labels

Comments

@dsc
Copy link
Owner

dsc commented Oct 19, 2024

I've been a bad maintainer, bc I have code for...

  • BunchBunch — essentially the same as calling bunchify() in the constructor, creating recursive bunches out of sub-dictionaries ... but as a feature of a subclass.
  • OrderedBunch — ensures keys have stable iteration order.
  • DefaultBunch — requests for missing keys return a given value / consult a function.
  • ProxyBunch — multiple bunches form a "cascade" of lookups where the first hit is returned.
  • BorgBunch — many Bunch, one dict. I rarely find a use for this, but it's always a a cool and easy addition.

In addition, each supports multiple inheritance when reasonable.

@dsc dsc added 2.0 2.x and removed 2.0 labels Oct 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant