Skip to content

Value attribute differently named in odml and nixpy #308

Closed

Description

@mpsonntag

The Property.value accessor is differently named in odml (Property.value) and nixpy (Property.values).

Should we unify this to either of the attribute names? This would be a breaking change.

Activity

  1. jgrewe commented on Nov 6, 2018

    @jgrewe
    Member

    I guess this should indeed be named in the same way. I am completely uncertain whether to favour p.value or p.values.
    This does not necessarily mean a breaking change, though, we could support both for a while and deprecate the one or the other.

  2. JuliaSprenger commented on Nov 6, 2018

    @JuliaSprenger
    Contributor

    I think p.values is more intuitive because it is always a list being returned and never a single item.

  3. achilleas-k commented on Nov 6, 2018

    @achilleas-k
    Member

    I was about to suggest making it value as it sounds (in my opinion) more general. My thinking was that even when it's multiple values, you can think of it as the value of this property is a list. @JuliaSprenger makes a good point though that even in single value cases, we return a tuple, so values signals that we're returning some sort of iterable or collection.

    So I vote for values.

    To @jgrewe's point, we could also keep both. Is there a good reason for deprecating one in the long run? I guess it might lead to some confusion. Two properties where one is an alias for the other isn't common so some may take it as a signal that there's a difference (unless they read the documentation). That said, I wouldn't be against having both without deprecating (any time soon).

  4. mpsonntag commented on Nov 6, 2018

    @mpsonntag
    ContributorAuthor

    I would vote for p.values in odml and keeping p.value with a deprecation warning for the next year (or other arbitrary timeframe).

  5. self-assigned this
    on Nov 6, 2018
  6. added a commit that references this issue on Nov 21, 2018
    8156605
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions