/
opt
/
alt
/
python35
/
lib64
/
python3.5
/
/opt/alt/python35/lib64/python3.5
mkdir
upload
Name
Size
Mode
Actions
asyncio/
-
0755
rm
collections/
-
0755
rm
concurrent/
-
0755
rm
config-3.5m/
-
0755
rm
ctypes/
-
0755
rm
curses/
-
0755
rm
dbm/
-
0755
rm
distutils/
-
0755
rm
email/
-
0755
rm
encodings/
-
0755
rm
ensurepip/
-
0755
rm
html/
-
0755
rm
http/
-
0755
rm
idlelib/
-
0755
rm
importlib/
-
0755
rm
json/
-
0755
rm
lib-dynload/
-
0755
rm
lib2to3/
-
0755
rm
logging/
-
0755
rm
multiprocessing/
-
0755
rm
plat-linux/
-
0755
rm
pydoc_data/
-
0755
rm
site-packages/
-
0755
rm
sqlite3/
-
0755
rm
test/
-
0755
rm
unittest/
-
0755
rm
urllib/
-
0755
rm
venv/
-
0755
rm
wsgiref/
-
0755
rm
xml/
-
0755
rm
xmlrpc/
-
0755
rm
__pycache__/
-
0755
rm
abc.py
8628
0644
edit
dl
rm
aifc.py
31967
0644
edit
dl
rm
antigravity.py
476
0644
edit
dl
rm
argparse.py
90138
0644
edit
dl
rm
ast.py
12001
0644
edit
dl
rm
asynchat.py
11971
0644
edit
dl
rm
asyncore.py
20104
0644
edit
dl
rm
base64.py
20522
0755
edit
dl
rm
bdb.py
23354
0644
edit
dl
rm
binhex.py
13954
0644
edit
dl
rm
bisect.py
2595
0644
edit
dl
rm
bz2.py
12424
0644
edit
dl
rm
calendar.py
22998
0644
edit
dl
rm
cgi.py
36046
0755
edit
dl
rm
cgitb.py
12023
0644
edit
dl
rm
chunk.py
5425
0644
edit
dl
rm
cmd.py
14860
0644
edit
dl
rm
code.py
10118
0644
edit
dl
rm
codecs.py
36231
0644
edit
dl
rm
codeop.py
5994
0644
edit
dl
rm
colorsys.py
4064
0644
edit
dl
rm
compileall.py
11711
0644
edit
dl
rm
configparser.py
53452
0644
edit
dl
rm
contextlib.py
12451
0644
edit
dl
rm
copy.py
8946
0644
edit
dl
rm
copyreg.py
6833
0644
edit
dl
rm
cProfile.py
5324
0755
edit
dl
rm
crypt.py
1879
0644
edit
dl
rm
csv.py
16128
0644
edit
dl
rm
datetime.py
75899
0644
edit
dl
rm
decimal.py
320
0644
edit
dl
rm
difflib.py
84204
0644
edit
dl
rm
dis.py
17350
0644
edit
dl
rm
doctest.py
104036
0644
edit
dl
rm
dummy_threading.py
2815
0644
edit
dl
rm
enum.py
22226
0644
edit
dl
rm
filecmp.py
9830
0644
edit
dl
rm
fileinput.py
14259
0644
edit
dl
rm
fnmatch.py
3163
0644
edit
dl
rm
formatter.py
15143
0644
edit
dl
rm
fractions.py
24612
0644
edit
dl
rm
ftplib.py
34951
0644
edit
dl
rm
functools.py
28944
0644
edit
dl
rm
genericpath.py
4364
0644
edit
dl
rm
getopt.py
7489
0644
edit
dl
rm
getpass.py
5994
0644
edit
dl
rm
gettext.py
21530
0644
edit
dl
rm
glob.py
5072
0644
edit
dl
rm
gzip.py
20260
0644
edit
dl
rm
hashlib.py
7979
0644
edit
dl
rm
heapq.py
22929
0644
edit
dl
rm
hmac.py
5063
0644
edit
dl
rm
imaplib.py
52183
0644
edit
dl
rm
imghdr.py
3758
0644
edit
dl
rm
imp.py
10676
0644
edit
dl
rm
inspect.py
114199
0644
edit
dl
rm
io.py
3396
0644
edit
dl
rm
ipaddress.py
75733
0644
edit
dl
rm
keyword.py
2222
0755
edit
dl
rm
linecache.py
5312
0644
edit
dl
rm
locale.py
74713
0644
edit
dl
rm
lzma.py
12925
0644
edit
dl
rm
macpath.py
5907
0644
edit
dl
rm
macurl2path.py
2732
0644
edit
dl
rm
mailbox.py
78418
0644
edit
dl
rm
mailcap.py
8104
0644
edit
dl
rm
mimetypes.py
20847
0644
edit
dl
rm
modulefinder.py
23085
0644
edit
dl
rm
netrc.py
5748
0644
edit
dl
rm
nntplib.py
43078
0644
edit
dl
rm
ntpath.py
22793
0644
edit
dl
rm
nturl2path.py
2444
0644
edit
dl
rm
numbers.py
10243
0644
edit
dl
rm
opcode.py
5885
0644
edit
dl
rm
operator.py
10863
0644
edit
dl
rm
optparse.py
60344
0644
edit
dl
rm
os.py
37033
0644
edit
dl
rm
pathlib.py
47001
0644
edit
dl
rm
pdb.py
61149
0755
edit
dl
rm
pickle.py
56176
0644
edit
dl
rm
pickletools.py
91761
0644
edit
dl
rm
pipes.py
8916
0644
edit
dl
rm
pkgutil.py
21355
0644
edit
dl
rm
platform.py
46147
0755
edit
dl
rm
plistlib.py
31810
0644
edit
dl
rm
poplib.py
14717
0644
edit
dl
rm
posixpath.py
14911
0644
edit
dl
rm
pprint.py
20860
0644
edit
dl
rm
profile.py
22032
0755
edit
dl
rm
pstats.py
26564
0644
edit
dl
rm
pty.py
4763
0644
edit
dl
rm
pyclbr.py
13564
0644
edit
dl
rm
pydoc.py
103652
0755
edit
dl
rm
py_compile.py
7181
0644
edit
dl
rm
queue.py
8780
0644
edit
dl
rm
quopri.py
7265
0755
edit
dl
rm
random.py
26463
0644
edit
dl
rm
re.py
15501
0644
edit
dl
rm
reprlib.py
5336
0644
edit
dl
rm
rlcompleter.py
6307
0644
edit
dl
rm
runpy.py
11959
0644
edit
dl
rm
sched.py
6216
0644
edit
dl
rm
selectors.py
19438
0644
edit
dl
rm
shelve.py
8528
0644
edit
dl
rm
shlex.py
11448
0644
edit
dl
rm
shutil.py
40048
0644
edit
dl
rm
signal.py
2123
0644
edit
dl
rm
site.py
21509
0644
edit
dl
rm
smtpd.py
35373
0755
edit
dl
rm
smtplib.py
43635
0755
edit
dl
rm
sndhdr.py
6418
0644
edit
dl
rm
socket.py
27135
0644
edit
dl
rm
socketserver.py
24666
0644
edit
dl
rm
sre_compile.py
18410
0644
edit
dl
rm
sre_constants.py
6821
0644
edit
dl
rm
sre_parse.py
35117
0644
edit
dl
rm
ssl.py
42352
0644
edit
dl
rm
stat.py
5038
0644
edit
dl
rm
statistics.py
19533
0644
edit
dl
rm
string.py
11854
0644
edit
dl
rm
stringprep.py
12917
0644
edit
dl
rm
struct.py
257
0644
edit
dl
rm
subprocess.py
58912
0644
edit
dl
rm
sunau.py
18095
0644
edit
dl
rm
symbol.py
2106
0755
edit
dl
rm
symtable.py
7191
0644
edit
dl
rm
sysconfig.py
24462
0644
edit
dl
rm
tabnanny.py
11414
0755
edit
dl
rm
tarfile.py
93070
0755
edit
dl
rm
telnetlib.py
23016
0644
edit
dl
rm
tempfile.py
26636
0644
edit
dl
rm
textwrap.py
19558
0644
edit
dl
rm
this.py
1003
0644
edit
dl
rm
threading.py
49027
0644
edit
dl
rm
timeit.py
12403
0755
edit
dl
rm
token.py
3075
0644
edit
dl
rm
tokenize.py
27790
0644
edit
dl
rm
trace.py
31553
0755
edit
dl
rm
traceback.py
22175
0644
edit
dl
rm
tracemalloc.py
15641
0644
edit
dl
rm
tty.py
879
0644
edit
dl
rm
types.py
8799
0644
edit
dl
rm
typing.py
80135
0644
edit
dl
rm
uu.py
6766
0755
edit
dl
rm
uuid.py
23261
0644
edit
dl
rm
warnings.py
15850
0644
edit
dl
rm
wave.py
17682
0644
edit
dl
rm
weakref.py
20466
0644
edit
dl
rm
webbrowser.py
21828
0755
edit
dl
rm
xdrlib.py
5913
0644
edit
dl
rm
zipapp.py
7157
0644
edit
dl
rm
zipfile.py
73672
0644
edit
dl
rm
_bootlocale.py
1301
0644
edit
dl
rm
_collections_abc.py
24794
0644
edit
dl
rm
_compat_pickle.py
8556
0644
edit
dl
rm
_compression.py
5340
0644
edit
dl
rm
_dummy_thread.py
5118
0644
edit
dl
rm
_markupbase.py
14598
0644
edit
dl
rm
_osx_support.py
19115
0644
edit
dl
rm
_pydecimal.py
228628
0644
edit
dl
rm
_pyio.py
87968
0644
edit
dl
rm
_sitebuiltins.py
3115
0644
edit
dl
rm
_strptime.py
22185
0644
edit
dl
rm
_sysconfigdata.py
24273
0644
edit
dl
rm
_threading_local.py
7410
0644
edit
dl
rm
_weakrefset.py
5705
0644
edit
dl
rm
__future__.py
4841
0644
edit
dl
rm
__phello__.foo.py
64
0644
edit
dl
rm
Edit:
/opt/alt/python35/lib64/python3.5/numbers.py
(10243B)
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) for numbers, according to PEP 3141. TODO: Fill out more detailed documentation on the operators.""" from abc import ABCMeta, abstractmethod __all__ = ["Number", "Complex", "Real", "Rational", "Integral"] class Number(metaclass=ABCMeta): """All numbers inherit from this class. If you just want to check if an argument x is a number, without caring what kind, use isinstance(x, Number). """ __slots__ = () # Concrete numeric types must provide their own hash implementation __hash__ = None ## Notes on Decimal ## ---------------- ## Decimal has all of the methods specified by the Real abc, but it should ## not be registered as a Real because decimals do not interoperate with ## binary floats (i.e. Decimal('3.14') + 2.71828 is undefined). But, ## abstract reals are expected to interoperate (i.e. R1 + R2 should be ## expected to work if R1 and R2 are both Reals). class Complex(Number): """Complex defines the operations that work on the builtin complex type. In short, those are: a conversion to complex, .real, .imag, +, -, *, /, abs(), .conjugate, ==, and !=. If it is given heterogenous arguments, and doesn't have special knowledge about them, it should fall back to the builtin complex type as described below. """ __slots__ = () @abstractmethod def __complex__(self): """Return a builtin complex instance. Called for complex(self).""" def __bool__(self): """True if self != 0. Called for bool(self).""" return self != 0 @property @abstractmethod def real(self): """Retrieve the real component of this number. This should subclass Real. """ raise NotImplementedError @property @abstractmethod def imag(self): """Retrieve the imaginary component of this number. This should subclass Real. """ raise NotImplementedError @abstractmethod def __add__(self, other): """self + other""" raise NotImplementedError @abstractmethod def __radd__(self, other): """other + self""" raise NotImplementedError @abstractmethod def __neg__(self): """-self""" raise NotImplementedError @abstractmethod def __pos__(self): """+self""" raise NotImplementedError def __sub__(self, other): """self - other""" return self + -other def __rsub__(self, other): """other - self""" return -self + other @abstractmethod def __mul__(self, other): """self * other""" raise NotImplementedError @abstractmethod def __rmul__(self, other): """other * self""" raise NotImplementedError @abstractmethod def __truediv__(self, other): """self / other: Should promote to float when necessary.""" raise NotImplementedError @abstractmethod def __rtruediv__(self, other): """other / self""" raise NotImplementedError @abstractmethod def __pow__(self, exponent): """self**exponent; should promote to float or complex when necessary.""" raise NotImplementedError @abstractmethod def __rpow__(self, base): """base ** self""" raise NotImplementedError @abstractmethod def __abs__(self): """Returns the Real distance from 0. Called for abs(self).""" raise NotImplementedError @abstractmethod def conjugate(self): """(x+y*i).conjugate() returns (x-y*i).""" raise NotImplementedError @abstractmethod def __eq__(self, other): """self == other""" raise NotImplementedError Complex.register(complex) class Real(Complex): """To Complex, Real adds the operations that work on real numbers. In short, those are: a conversion to float, trunc(), divmod, %, <, <=, >, and >=. Real also provides defaults for the derived operations. """ __slots__ = () @abstractmethod def __float__(self): """Any Real can be converted to a native float object. Called for float(self).""" raise NotImplementedError @abstractmethod def __trunc__(self): """trunc(self): Truncates self to an Integral. Returns an Integral i such that: * i>0 iff self>0; * abs(i) <= abs(self); * for any Integral j satisfying the first two conditions, abs(i) >= abs(j) [i.e. i has "maximal" abs among those]. i.e. "truncate towards 0". """ raise NotImplementedError @abstractmethod def __floor__(self): """Finds the greatest Integral <= self.""" raise NotImplementedError @abstractmethod def __ceil__(self): """Finds the least Integral >= self.""" raise NotImplementedError @abstractmethod def __round__(self, ndigits=None): """Rounds self to ndigits decimal places, defaulting to 0. If ndigits is omitted or None, returns an Integral, otherwise returns a Real. Rounds half toward even. """ raise NotImplementedError def __divmod__(self, other): """divmod(self, other): The pair (self // other, self % other). Sometimes this can be computed faster than the pair of operations. """ return (self // other, self % other) def __rdivmod__(self, other): """divmod(other, self): The pair (self // other, self % other). Sometimes this can be computed faster than the pair of operations. """ return (other // self, other % self) @abstractmethod def __floordiv__(self, other): """self // other: The floor() of self/other.""" raise NotImplementedError @abstractmethod def __rfloordiv__(self, other): """other // self: The floor() of other/self.""" raise NotImplementedError @abstractmethod def __mod__(self, other): """self % other""" raise NotImplementedError @abstractmethod def __rmod__(self, other): """other % self""" raise NotImplementedError @abstractmethod def __lt__(self, other): """self < other < on Reals defines a total ordering, except perhaps for NaN.""" raise NotImplementedError @abstractmethod def __le__(self, other): """self <= other""" raise NotImplementedError # Concrete implementations of Complex abstract methods. def __complex__(self): """complex(self) == complex(float(self), 0)""" return complex(float(self)) @property def real(self): """Real numbers are their real component.""" return +self @property def imag(self): """Real numbers have no imaginary component.""" return 0 def conjugate(self): """Conjugate is a no-op for Reals.""" return +self Real.register(float) class Rational(Real): """.numerator and .denominator should be in lowest terms.""" __slots__ = () @property @abstractmethod def numerator(self): raise NotImplementedError @property @abstractmethod def denominator(self): raise NotImplementedError # Concrete implementation of Real's conversion to float. def __float__(self): """float(self) = self.numerator / self.denominator It's important that this conversion use the integer's "true" division rather than casting one side to float before dividing so that ratios of huge integers convert without overflowing. """ return self.numerator / self.denominator class Integral(Rational): """Integral adds a conversion to int and the bit-string operations.""" __slots__ = () @abstractmethod def __int__(self): """int(self)""" raise NotImplementedError def __index__(self): """Called whenever an index is needed, such as in slicing""" return int(self) @abstractmethod def __pow__(self, exponent, modulus=None): """self ** exponent % modulus, but maybe faster. Accept the modulus argument if you want to support the 3-argument version of pow(). Raise a TypeError if exponent < 0 or any argument isn't Integral. Otherwise, just implement the 2-argument version described in Complex. """ raise NotImplementedError @abstractmethod def __lshift__(self, other): """self << other""" raise NotImplementedError @abstractmethod def __rlshift__(self, other): """other << self""" raise NotImplementedError @abstractmethod def __rshift__(self, other): """self >> other""" raise NotImplementedError @abstractmethod def __rrshift__(self, other): """other >> self""" raise NotImplementedError @abstractmethod def __and__(self, other): """self & other""" raise NotImplementedError @abstractmethod def __rand__(self, other): """other & self""" raise NotImplementedError @abstractmethod def __xor__(self, other): """self ^ other""" raise NotImplementedError @abstractmethod def __rxor__(self, other): """other ^ self""" raise NotImplementedError @abstractmethod def __or__(self, other): """self | other""" raise NotImplementedError @abstractmethod def __ror__(self, other): """other | self""" raise NotImplementedError @abstractmethod def __invert__(self): """~self""" raise NotImplementedError # Concrete implementations of Rational and Real abstract methods. def __float__(self): """float(self) == float(int(self))""" return float(int(self)) @property def numerator(self): """Integers are their own numerators.""" return +self @property def denominator(self): """Integers have a denominator of 1.""" return 1 Integral.register(int)
Save
cmd:
run