Skip to content

Give to_value methods to Column ~and TimeDelta~? #6148

Closed

Description

@mhvk

Inspired by #6137 (comment): now that Quantity gained a to_value method, which turned out to be quite valuable, should TimeDelta and Column acquire the same method, so they can duck-type for quantities in more situations. Probably, no reason not to.

EDIT: TimeDelta.to_value was done in #8762

Activity

  1. eteq commented on Jun 16, 2017

    @eteq
    Member

    👍 for TimeDelta ... less sure about Column, though: I wonder if instead we should tell everyone to use QTable if they want that functionality, rather than making Column more franken-Quantity?

  2. taldcroft commented on Jun 19, 2017

    @taldcroft
    Member

    I agree completely with the comment by @eteq. I would even go so far as to consider deprecating Column.to eventually and making Column less of a franken-Quantity. Definitely when Quantity supports masking and can do anything in a table which Column can do, then we should deprecate and finally remove Column.to.

  3. mhvk commented on Jun 19, 2017

    @mhvk
    ContributorAuthor

    I think I also agree, Column really is not meant to be like a Quantity, while TimeDelta in many ways is a Quantity with time units that just happens to have internal state and be much more precise. It has been very useful for me to be able to treat it as such, i.e., have q / td produce a quantity. So, probably giving it a to_value as well is fine.

  4. mhvk commented on Jun 22, 2019

    @mhvk
    ContributorAuthor

    TimeDelta.to_value now exists (#8762); Column.to_value remains to do...

  5. changed the title [-]Given to_value methods to Column and TimeDelta?[/-] [+]Given to_value methods to Column ~and TimeDelta~?[/+] on Jun 22, 2019
  6. changed the title [-]Given to_value methods to Column ~and TimeDelta~?[/-] [+]Give to_value methods to Column ~and TimeDelta~?[/+] on Jul 17, 2019
  7. mhvk commented on Jul 17, 2019

    @mhvk
    ContributorAuthor

    I'll close this issue as we've done TimeDelta.to_value, which everyone agreed was a good idea, and there also seemed to be consensus that the remaining item, Column.to_value, was not a good idea,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions