def _timestamp_instants_eq(a, b):
    """Compares two timestamp operands for point-in-time equivalence only."""
    assert isinstance(a, datetime)
    if not isinstance(b, datetime):
        return False
    # datetime's __eq__ can't compare a None offset and a non-None offset. For these equivalence semantics, a None
    # offset (unknown local offset) is treated equivalently to a +00:00.
    if a.tzinfo is None:
        a = a.replace(tzinfo=OffsetTZInfo())
    if b.tzinfo is None:
        b = b.replace(tzinfo=OffsetTZInfo())
    # datetime's __eq__ implementation compares instants; offsets and precision need not be equal.
    return a == b
def _timestamp_instants_eq ( a , b ) : assert isinstance ( a , datetime ) if not isinstance ( b , datetime ) : return False if a . tzinfo is None : a = a . replace ( tzinfo = OffsetTZInfo ( ) ) if b . tzinfo is None : b = b . replace ( tzinfo = OffsetTZInfo ( ) ) return a == b
Compares two timestamp operands for point-in-time equivalence only.