OwlCyberSecurity - MANAGER
Edit File: Duration.cpython-38.pyc
U ��]� � @ s d Z ddlZG dd� de�ZdS )zDuration module.� Nc @ s� e Zd ZdZddgZdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd� Zd d!� Zd"d#� Zd$d%� Zd&d'� Zd(d)� Zd*d+� Zd,d-� Zd.d/� Zd0S )1�Durationz#Class Duration in development. ZETZUTCc C s4 || j kr$d|t| j �f }t|��|| _|| _dS )a* Create a new Duration object. = ERROR CONDITIONS - If the input frame is not in the allowed list, an error is thrown. = INPUT VARIABLES - frame The frame of the duration. Must be 'ET' or 'UTC' - seconds The number of seconds in the Duration. z9Input frame '%s' is not one of the supported frames of %sN)�allowed�str� ValueError�_frame�_seconds)�self�frame�seconds�msg� r �G/usr/lib/python3/dist-packages/matplotlib/testing/jpl_units/Duration.py�__init__ s �zDuration.__init__c C s | j S )z$Return the frame the duration is in.)r �r r r r r s zDuration.framec C s t | jt| j��S )z*Return the absolute value of the duration.)r r �absr r r r r �__abs__! s zDuration.__abs__c C s t | j| j �S )z+Return the negative value of this Duration.�r r r r r r r �__neg__% s zDuration.__neg__c C s | j S )z-Return the number of seconds in the Duration.�r r r r r r ) s zDuration.secondsc C s | j dkS )Nr r r r r r �__bool__- s zDuration.__bool__c C s | � |tj�S �N)�_cmp�operator�eq�r �rhsr r r �__eq__0 s zDuration.__eq__c C s | � |tj�S r )r r �ner r r r �__ne__3 s zDuration.__ne__c C s | � |tj�S r )r r �ltr r r r �__lt__6 s zDuration.__lt__c C s | � |tj�S r )r r �ler r r r �__le__9 s zDuration.__le__c C s | � |tj�S r )r r �gtr r r r �__gt__<