entropy-lab / entropy

BSD 3-Clause "New" or "Revised" License
30 stars 13 forks source link

add method of config builder behaves unexpectedly #211

Open liorella-qm opened 2 years ago

liorella-qm commented 2 years ago

the add method of the config builder has a very specific and idiosyncratic behvaior: It only accepts a single item or a list of items. This requires knowledge of internal implementation.

Much better to just let it accept a single item only. This is also the documentation.

SatyaBade12 commented 2 years ago

The very first implementation accepted one item, after a discussion with Gal and/or Nikola the support for adding a list of config builder objects was added (effectively we didn't update the doc string).

PS: this issue doesn't belong here, can someone with appropriate rights move this to py-qua-tools?

liorella-qm commented 2 years ago

there are 2 things here:

  1. we need to simplify the API. It is aleady quite complicated
  2. it only accepts lists, not sequences, and this is already un-pythonic