U mf@sdZGdddZdS)z&Serial Number Arthimetic from RFC 1982c@sveZdZdeedddZddZddZd d Zd d Zd dZ ddZ ddZ ddZ ddZ ddZddZdS)Serial valuebitscCs|d||_||_dS)Nr)selfrrr8/opt/hc_python/lib/python3.8/site-packages/dns/serial.py__init__szSerial.__init__cCsd|jd|jdS)Nzdns.serial.Serial(z, )r)rrrr __repr__ szSerial.__repr__cCs>t|trt||j}nt|tr.|j|jkr2tS|j|jkSN isinstanceintrrNotImplementedrrotherrrr __eq__s  z Serial.__eq__cCs>t|trt||j}nt|tr.|j|jkr2tS|j|jkSr rrrrr __ne__s  z Serial.__ne__cCst|trt||j}nt|tr.|j|jkr2tS|j|jkr\|j|jd|jdkr\dS|j|jkr|j|jd|jdkrdSdSdSNrTFrrrrr __lt__s &z Serial.__lt__cCs||kp||kSr rrrrr __le__*sz Serial.__le__cCst|trt||j}nt|tr.|j|jkr2tS|j|jkr\|j|jd|jdkr\dS|j|jkr|j|jd|jdkrdSdSdSrrrrrr __gt__-s &z Serial.__gt__cCs||kp||kSr rrrrr __ge__;sz Serial.__ge__cCsl|j}t|tr|j}nt|tr(|}ntt|d|jddkrJt||7}|d|j}t||jSNrrrrrr ValueErrorabsrrrvdeltarrr __add__>s  zSerial.__add__cCsj|j}t|tr|j}nt|tr(|}ntt|d|jddkrJt||7}|d|j}||_|Srrr rrr __iadd__Ls  zSerial.__iadd__cCsl|j}t|tr|j}nt|tr(|}ntt|d|jddkrJt||8}|d|j}t||jSrrr rrr __sub__[s  zSerial.__sub__cCsj|j}t|tr|j}nt|tr(|}ntt|d|jddkrJt||8}|d|j}||_|Srrr rrr __isub__is  zSerial.__isub__N)r)__name__ __module__ __qualname__rr r rrrrrrr#r$r%r&rrrr rsrN)__doc__rrrrr s