mewwts / addict

The Python Dict that's better than heroin.
MIT License
2.46k stars 132 forks source link

Maintainership & Altrenatives #129

Closed sumukhbarve closed 3 years ago

sumukhbarve commented 3 years ago

Hello,

Thank you so much for working on Addict. It's wonderful! JavaScript-like dot notation for Python dictionaries is extremely empowering, because it helps us avoid unnecessary class definitions.

We're big fans of Addict at my company. Typically, we use it without the recursive dict fallback, as KeyErrors can help prevent hard-to-diagnose bugs.

I noticed that Addict has been seeking new maintainers for a couple of months. I'd like to volunteer. But I must point out that we've recently released Dotsi, which is similar to Addict. While it is similar, there are a couple of differences:

  1. Lists: Dotsi brings dot-access to dicts-within-lists-within-dicts.
  2. Keys: Dotsi always raises a KeyError for missing keys.

My company relies on Addict. And while we plan on transitioning to Dotsi, I'd be happy to help maintain Addict.

I'd also like to urge you to kindly consider the following: Instead of seeking new maintainers, would you please be open to recommending EasyDict, Dotsi, or another library as an alternative/successor?

Thanks again for creating Addict. :)

Regards, Sumukh

mewwts commented 3 years ago

Hi Sumukh,

Thanks for the kind words and for reaching out! addict is still used frequently in the wild, and although it has some rough edges, I'd rather have someone work those out than sunsetting a library that's useful.

I also can't wholeheartedly recommend any other libraries because I've neither used them nor inspected their code.

While I appreciate your candidacy, at first glance it seems like your coming from a place where your motivation is promoting an alternative, Dotsi, and not necessarily develop addict further? I apologise if I've misread the situation.

sumukhbarve commented 3 years ago

Hi Mats,

Thanks for writing back. :)

I'm genuinely interested in helping with addict. At the same time, you're right, I'd like to promote Dotsi. While the two libraries are similar, I don't really think of them as competitors. They're both open source projects. addict has been around longer, and is far more battle-tested. I've used addict for quite some time, and have come to really like it.

Before addict/EasyDict, I'd often write classes just to enable dot-access. I honestly believe that classes are highly overrated. With addict, Python dicts start to resemble plain JavaScript object. By writing a single class, addict.Dict, you've helped everyone else avoid excessive classes.

I've started perusing addict's issues and should soon start participating in the discussion.

Cheers!

mewwts commented 3 years ago

Got it!

Thank you for clearing that up.

A good first step would be to pull out the freeze/unfreeze functionality from this https://github.com/mewwts/addict/pull/123 one. We already decided to include it, but the PR also bundles string-nesting which I'm not sure I want.

I'm happy to work with you on a few PRs and issues and then eventually add you as a maintainer :pray:

sumukhbarve commented 3 years ago

Hi Mats,

Thanks for getting back. Yes, of course, we're on the same page. Looking forward to working with you. :)

Just submitted PR #130, implementing #121's freeze/unfreeze. Went with a fresh implementation, instead of truncating #123.

Closing this issue, see you in #130.