Skip to content

Make Time equality comparison not raise an exception #2082

Closed

Description

@taldcroft

As a follow-on to #1832 and #2081, this is a proposal to adjust Time comparisons so that == and != never raise exceptions. Instead if the comparison is made with an incompatible object (so an OperandTypeError gets raised), that would be caught and the comparison would return False (even for an array Time).

This behavior seems more natural and would fit with how numpy handles comparisons with mis-typed objects. This is an API change.

Activity

  1. added this to the v0.4.0 milestone on Feb 11, 2014
  2. mhvk commented on Feb 13, 2014

    @mhvk
    Contributor

    +1 (these comparisons were from a time I had only just started with python; it shows...)

  3. modified the milestones: v1.0.0, v0.4.0 on May 18, 2014
  4. astrofrog commented on May 18, 2014

    @astrofrog
    Member

    Re-scheduling to 1.0

  5. mhvk commented on Jul 11, 2014

    @mhvk
    Contributor

    This was solved by #2114, so closing.

  6. removed this from the v1.0.0 milestone on Jul 11, 2014
  7. embray commented on Jul 11, 2014

    @embray
    Member

    When closing issues that are basically "won't fix" or "overcome by events" please also clear the milestone since the issue is no longer relevant to that milestone.

  8. added this to the v0.4.0 milestone on Jul 11, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions