honey-team / ufpy

Ufpy (Useful Python) - package for Python with some useful features
https://honey-team.github.io/ufpy-website
MIT License
3 stars 3 forks source link

UDict + cmp_generator #3

Closed bleudev closed 5 months ago

bleudev commented 5 months ago

Checklist:

closes #1 closes #2 closes #7 closes #8

bleudev commented 5 months ago

I'd change some things honestly:

  • Make indices start at 0 instead of 1
  • Getting the default attribute in the UDict.get(default=0) function, not when the UDict is initialised (eg. UDict(default=0))
  1. Not. It's feature
  2. I'll do this
bleudev commented 5 months ago

I'd remove the default kw arg from the UDict.__init__(), since if you want to pass in a key named default, you'll need to do that using a dict instead of keyword args, which can lead to bad code readability.

And I'd really change the indices to start from 0 for convenience.

Other than that everything looks good.

No, i don't want change this things

bleudev commented 5 months ago

You do you then

Thanks for approval!