Actually, there is a reason not to use different function names. At the moment add_attr_option
can take a single element (string, integer, etc.) or a collection of strings. If we invent add_ordered_attr_option
, we restrict the use of it only to collections of elements, since it wouldn’t make sense for individual values.
A more unified approach is the one where the type of collection dictates whether it’s ordered or unordered, that is S0 in @junrushao’s post. This way we would use add_attr_option
in every case, and only vary the value types.