Viewing File: /opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/msgpack/__pycache__/ext.cpython-35.pyc
t_ @ s d d l m Z d d l Z d d l Z d d l Z e j d d k Z e rb e e f Z d Z
nC e Z y e j j Z
Wn* e
k
r e j e j d Z
Yn XGd d d e d d Z Gd d d e Z d S) )
namedtupleN c s( e Z d Z d Z f d d Z S)ExtTypez'ExtType represents ext type in msgpack.c sz t | t s t d t | t s6 t d d | k oM d k n s^ t d t t | j | | | S)Nzcode must be intzdata must be bytesr zcode must be 0~127)
isinstanceint TypeErrorbytes
ValueErrorsuperr __new__)clscodedata) __class__ /builddir/build/BUILDROOT/alt-python35-pip-20.2.4-1.el7.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/msgpack/ext.pyr s zExtType.__new__)__name__
__module____qualname____doc__r r r )r r r s r z code datac @ s e Z d Z d Z d d g Z d d d Z d d Z d d
Z d d Z d
d Z e
d d Z d d Z e
d d Z
d d Z e
d d Z d d Z d d Z e
d d Z d S) TimestampaR Timestamp represents the Timestamp extension type in msgpack.
When built with Cython, msgpack uses C methods to pack and unpack `Timestamp`. When using pure-Python
msgpack, :func:`to_bytes` and :func:`from_bytes` are used to pack and unpack `Timestamp`.
This class is immutable: Do not override seconds and nanoseconds.
secondsnanosecondsr c C st t | t s t d t | t s6 t d d | k oM d k n s^ t d | | _ | | _ d S) a Initialize a Timestamp object.
:param int seconds:
Number of seconds since the UNIX epoch (00:00:00 UTC Jan 1 1970, minus leap seconds).
May be negative.
:param int nanoseconds:
Number of nanoseconds to add to `seconds` to get fractional time.
Maximum is 999_999_999. Default is 0.
Note: Negative times (before the UNIX epoch) are represented as negative seconds + positive ns.
zseconds must be an intergerznanoseconds must be an integerr
z?nanoseconds must be a non-negative integer less than 999999999.Ni ʚ;)r int_typesr r
r r )selfr r r r r __init__- s
zTimestamp.__init__c C s d j | j | j S)z#String representation of Timestamp.z'Timestamp(seconds={0}, nanoseconds={1}))formatr r )r r r r __repr__E s zTimestamp.__repr__c C s; t | | j k r7 | j | j k o6 | j | j k Sd S)z0Check for equality with another Timestamp objectF)typer r r )r otherr r r __eq__K s "zTimestamp.__eq__c C s | j | S)z(not-equals method (see :func:`__eq__()`))r# )r r"