Linux server1.hosting4iran.com 4.18.0-553.123.2.el8_10.x86_64 #1 SMP Thu May 7 15:28:41 EDT 2026 x86_64
LiteSpeed
Server IP : 185.208.174.156 & Your IP : 216.73.216.143
Domains : 326 Domain
User : satitravel
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
doc /
python3-docs /
html /
library /
Delete
Unzip
Name
Size
Permission
Date
Action
2to3.html
60.26
KB
-rw-r--r--
2023-12-18 11:36
__future__.html
15.42
KB
-rw-r--r--
2023-12-18 11:36
__main__.html
8.81
KB
-rw-r--r--
2023-12-18 11:36
_dummy_thread.html
8.98
KB
-rw-r--r--
2023-12-18 11:36
_thread.html
22.06
KB
-rw-r--r--
2023-12-18 11:36
abc.html
40.42
KB
-rw-r--r--
2023-12-18 11:36
aifc.html
27.46
KB
-rw-r--r--
2023-12-18 11:36
allos.html
31.48
KB
-rw-r--r--
2023-12-18 11:36
archiving.html
11.71
KB
-rw-r--r--
2023-12-18 11:36
argparse.html
268.54
KB
-rw-r--r--
2023-12-18 11:36
array.html
32.76
KB
-rw-r--r--
2023-12-18 11:36
ast.html
38.67
KB
-rw-r--r--
2023-12-18 11:36
asynchat.html
31.78
KB
-rw-r--r--
2023-12-18 11:36
asyncio-dev.html
50.65
KB
-rw-r--r--
2023-12-18 11:36
asyncio-eventloop.html
108.61
KB
-rw-r--r--
2023-12-18 11:36
asyncio-eventloops.html
32.25
KB
-rw-r--r--
2023-12-18 11:36
asyncio-protocol.html
85.38
KB
-rw-r--r--
2023-12-18 11:36
asyncio-queue.html
23.4
KB
-rw-r--r--
2023-12-18 11:36
asyncio-stream.html
59.58
KB
-rw-r--r--
2023-12-18 11:36
asyncio-subprocess.html
56.66
KB
-rw-r--r--
2023-12-18 11:36
asyncio-sync.html
34.84
KB
-rw-r--r--
2023-12-18 11:36
asyncio-task.html
82
KB
-rw-r--r--
2023-12-18 11:36
asyncio.html
27.37
KB
-rw-r--r--
2023-12-18 11:36
asyncore.html
41.71
KB
-rw-r--r--
2023-12-18 11:36
atexit.html
18
KB
-rw-r--r--
2023-12-18 11:36
audioop.html
34.61
KB
-rw-r--r--
2023-12-18 11:36
base64.html
35.6
KB
-rw-r--r--
2023-12-18 11:36
bdb.html
42.41
KB
-rw-r--r--
2023-12-18 11:36
binary.html
12.42
KB
-rw-r--r--
2023-12-18 11:36
binascii.html
24.17
KB
-rw-r--r--
2023-12-18 11:36
binhex.html
11.4
KB
-rw-r--r--
2023-12-18 11:36
bisect.html
25
KB
-rw-r--r--
2023-12-18 11:36
builtins.html
11.33
KB
-rw-r--r--
2023-12-18 11:36
bz2.html
32.58
KB
-rw-r--r--
2023-12-18 11:36
calendar.html
38.61
KB
-rw-r--r--
2023-12-18 11:36
cgi.html
54.57
KB
-rw-r--r--
2023-12-18 11:36
cgitb.html
12.47
KB
-rw-r--r--
2023-12-18 11:36
chunk.html
16.48
KB
-rw-r--r--
2023-12-18 11:36
cmath.html
33.37
KB
-rw-r--r--
2023-12-18 11:36
cmd.html
42.78
KB
-rw-r--r--
2023-12-18 11:36
code.html
27.23
KB
-rw-r--r--
2023-12-18 11:36
codecs.html
130.93
KB
-rw-r--r--
2023-12-18 11:36
codeop.html
13.97
KB
-rw-r--r--
2023-12-18 11:36
collections.abc.html
59.48
KB
-rw-r--r--
2023-12-18 11:36
collections.html
151.31
KB
-rw-r--r--
2023-12-18 11:36
colorsys.html
12.33
KB
-rw-r--r--
2023-12-18 11:36
compileall.html
27.6
KB
-rw-r--r--
2023-12-18 11:36
concurrency.html
20.71
KB
-rw-r--r--
2023-12-18 11:36
concurrent.futures.html
59.24
KB
-rw-r--r--
2023-12-18 11:36
concurrent.html
7.77
KB
-rw-r--r--
2023-12-18 11:36
configparser.html
137.75
KB
-rw-r--r--
2023-12-18 11:36
constants.html
17.09
KB
-rw-r--r--
2023-12-18 11:36
contextlib.html
86.72
KB
-rw-r--r--
2023-12-18 11:36
copy.html
13.52
KB
-rw-r--r--
2023-12-18 11:36
copyreg.html
14.38
KB
-rw-r--r--
2023-12-18 11:36
crypt.html
19.85
KB
-rw-r--r--
2023-12-18 11:36
crypto.html
10.66
KB
-rw-r--r--
2023-12-18 11:36
csv.html
67.42
KB
-rw-r--r--
2023-12-18 11:36
ctypes.html
258.33
KB
-rw-r--r--
2023-12-18 11:36
curses.ascii.html
24.61
KB
-rw-r--r--
2023-12-18 11:36
curses.html
171.44
KB
-rw-r--r--
2023-12-18 11:36
curses.panel.html
16.31
KB
-rw-r--r--
2023-12-18 11:36
custominterp.html
8.53
KB
-rw-r--r--
2023-12-18 11:36
datatypes.html
23.39
KB
-rw-r--r--
2023-12-18 11:36
datetime.html
299.25
KB
-rw-r--r--
2023-12-18 11:36
dbm.html
42.11
KB
-rw-r--r--
2023-12-18 11:36
debug.html
13.66
KB
-rw-r--r--
2023-12-18 11:36
decimal.html
228.01
KB
-rw-r--r--
2023-12-18 11:36
development.html
24.53
KB
-rw-r--r--
2023-12-18 11:36
difflib.html
93.9
KB
-rw-r--r--
2023-12-18 11:36
dis.html
103.7
KB
-rw-r--r--
2023-12-18 11:36
distribution.html
10.26
KB
-rw-r--r--
2023-12-18 11:36
distutils.html
10.63
KB
-rw-r--r--
2023-12-18 11:36
doctest.html
175.54
KB
-rw-r--r--
2023-12-18 11:36
dummy_threading.html
9.1
KB
-rw-r--r--
2023-12-18 11:36
email.charset.html
25.81
KB
-rw-r--r--
2023-12-18 11:36
email.compat32-message.html
84.13
KB
-rw-r--r--
2023-12-18 11:36
email.contentmanager.html
29.32
KB
-rw-r--r--
2023-12-18 11:36
email.encoders.html
13.92
KB
-rw-r--r--
2023-12-18 11:36
email.errors.html
19.24
KB
-rw-r--r--
2023-12-18 11:36
email.examples.html
56.52
KB
-rw-r--r--
2023-12-18 11:36
email.generator.html
40.82
KB
-rw-r--r--
2023-12-18 11:36
email.header.html
30.49
KB
-rw-r--r--
2023-12-18 11:36
email.headerregistry.html
56.32
KB
-rw-r--r--
2023-12-18 11:36
email.html
27.09
KB
-rw-r--r--
2023-12-18 11:36
email.iterators.html
13.21
KB
-rw-r--r--
2023-12-18 11:36
email.message.html
85.17
KB
-rw-r--r--
2023-12-18 11:36
email.mime.html
35.24
KB
-rw-r--r--
2023-12-18 11:36
email.parser.html
46.32
KB
-rw-r--r--
2023-12-18 11:36
email.policy.html
73.48
KB
-rw-r--r--
2023-12-18 11:36
email.util.html
33.06
KB
-rw-r--r--
2023-12-18 11:36
ensurepip.html
18.26
KB
-rw-r--r--
2023-12-18 11:36
enum.html
130.81
KB
-rw-r--r--
2023-12-18 11:36
errno.html
40.36
KB
-rw-r--r--
2023-12-18 11:36
exceptions.html
83.16
KB
-rw-r--r--
2023-12-18 11:36
faulthandler.html
22.85
KB
-rw-r--r--
2023-12-18 11:36
fcntl.html
26.68
KB
-rw-r--r--
2023-12-18 11:36
filecmp.html
24.45
KB
-rw-r--r--
2023-12-18 11:36
fileformats.html
10.87
KB
-rw-r--r--
2023-12-18 11:36
fileinput.html
29.33
KB
-rw-r--r--
2023-12-18 11:36
filesys.html
13.1
KB
-rw-r--r--
2023-12-18 11:36
fnmatch.html
16.59
KB
-rw-r--r--
2023-12-18 11:36
formatter.html
36.78
KB
-rw-r--r--
2023-12-18 11:36
fpectl.html
17.13
KB
-rw-r--r--
2023-12-18 11:36
fractions.html
29.22
KB
-rw-r--r--
2023-12-18 11:36
frameworks.html
13.16
KB
-rw-r--r--
2023-12-18 11:36
ftplib.html
53.15
KB
-rw-r--r--
2023-12-18 11:36
functional.html
8.79
KB
-rw-r--r--
2023-12-18 11:36
functions.html
196.76
KB
-rw-r--r--
2023-12-18 11:36
functools.html
63.43
KB
-rw-r--r--
2023-12-18 11:36
gc.html
28.83
KB
-rw-r--r--
2023-12-18 11:36
getopt.html
24.76
KB
-rw-r--r--
2023-12-18 11:36
getpass.html
11.78
KB
-rw-r--r--
2023-12-18 11:36
gettext.html
74.84
KB
-rw-r--r--
2023-12-18 11:36
glob.html
18
KB
-rw-r--r--
2023-12-18 11:36
grp.html
12.09
KB
-rw-r--r--
2023-12-18 11:36
gzip.html
31.9
KB
-rw-r--r--
2023-12-18 11:36
hashlib.html
77.69
KB
-rw-r--r--
2023-12-18 11:36
heapq.html
34.7
KB
-rw-r--r--
2023-12-18 11:36
hmac.html
17.41
KB
-rw-r--r--
2023-12-18 11:36
html.entities.html
11.09
KB
-rw-r--r--
2023-12-18 11:36
html.html
10.85
KB
-rw-r--r--
2023-12-18 11:36
html.parser.html
40.86
KB
-rw-r--r--
2023-12-18 11:36
http.client.html
63.72
KB
-rw-r--r--
2023-12-18 11:36
http.cookiejar.html
93.94
KB
-rw-r--r--
2023-12-18 11:36
http.cookies.html
38.41
KB
-rw-r--r--
2023-12-18 11:36
http.html
36.72
KB
-rw-r--r--
2023-12-18 11:36
http.server.html
56.83
KB
-rw-r--r--
2023-12-18 11:36
i18n.html
10.22
KB
-rw-r--r--
2023-12-18 11:36
idle.html
47.28
KB
-rw-r--r--
2023-12-18 11:36
imaplib.html
65.76
KB
-rw-r--r--
2023-12-18 11:36
imghdr.html
13.14
KB
-rw-r--r--
2023-12-18 11:36
imp.html
47.02
KB
-rw-r--r--
2023-12-18 11:36
importlib.html
169.05
KB
-rw-r--r--
2023-12-18 11:36
index.html
66.18
KB
-rw-r--r--
2023-12-18 11:36
inspect.html
127.3
KB
-rw-r--r--
2023-12-18 11:36
internet.html
30.36
KB
-rw-r--r--
2023-12-18 11:36
intro.html
9.67
KB
-rw-r--r--
2023-12-18 11:36
io.html
119.81
KB
-rw-r--r--
2023-12-18 11:36
ipaddress.html
103.39
KB
-rw-r--r--
2023-12-18 11:36
ipc.html
32.95
KB
-rw-r--r--
2023-12-18 11:36
itertools.html
129.71
KB
-rw-r--r--
2023-12-18 11:36
json.html
79.18
KB
-rw-r--r--
2023-12-18 11:36
keyword.html
8.71
KB
-rw-r--r--
2023-12-18 11:36
language.html
13.33
KB
-rw-r--r--
2023-12-18 11:36
linecache.html
13.18
KB
-rw-r--r--
2023-12-18 11:36
locale.html
60.1
KB
-rw-r--r--
2023-12-18 11:36
logging.config.html
83.49
KB
-rw-r--r--
2023-12-18 11:36
logging.handlers.html
109.76
KB
-rw-r--r--
2023-12-18 11:36
logging.html
131.69
KB
-rw-r--r--
2023-12-18 11:36
lzma.html
55.16
KB
-rw-r--r--
2023-12-18 11:36
macpath.html
9.04
KB
-rw-r--r--
2023-12-18 11:36
mailbox.html
153.63
KB
-rw-r--r--
2023-12-18 11:36
mailcap.html
14.33
KB
-rw-r--r--
2023-12-18 11:36
markup.html
18.9
KB
-rw-r--r--
2023-12-18 11:36
marshal.html
17.89
KB
-rw-r--r--
2023-12-18 11:36
math.html
52.4
KB
-rw-r--r--
2023-12-18 11:36
mimetypes.html
30.67
KB
-rw-r--r--
2023-12-18 11:36
misc.html
7.93
KB
-rw-r--r--
2023-12-18 11:36
mm.html
9.79
KB
-rw-r--r--
2023-12-18 11:36
mmap.html
33.49
KB
-rw-r--r--
2023-12-18 11:36
modulefinder.html
18.12
KB
-rw-r--r--
2023-12-18 11:36
modules.html
10.66
KB
-rw-r--r--
2023-12-18 11:36
msilib.html
55.86
KB
-rw-r--r--
2023-12-18 11:36
msvcrt.html
21.47
KB
-rw-r--r--
2023-12-18 11:36
multiprocessing.html
356.92
KB
-rw-r--r--
2023-12-18 11:36
netdata.html
17.06
KB
-rw-r--r--
2023-12-18 11:36
netrc.html
14.23
KB
-rw-r--r--
2023-12-18 11:36
nis.html
11.39
KB
-rw-r--r--
2023-12-18 11:36
nntplib.html
67.97
KB
-rw-r--r--
2023-12-18 11:36
numbers.html
40.46
KB
-rw-r--r--
2023-12-18 11:36
numeric.html
15.17
KB
-rw-r--r--
2023-12-18 11:36
operator.html
79.55
KB
-rw-r--r--
2023-12-18 11:36
optparse.html
244.08
KB
-rw-r--r--
2023-12-18 11:36
os.html
388.71
KB
-rw-r--r--
2023-12-18 11:36
os.path.html
52.56
KB
-rw-r--r--
2023-12-18 11:36
ossaudiodev.html
46.82
KB
-rw-r--r--
2023-12-18 11:36
othergui.html
10.02
KB
-rw-r--r--
2023-12-18 11:36
parser.html
41.41
KB
-rw-r--r--
2023-12-18 11:36
pathlib.html
113.99
KB
-rw-r--r--
2023-12-18 11:36
pdb.html
51.43
KB
-rw-r--r--
2023-12-18 11:36
persistence.html
14.92
KB
-rw-r--r--
2023-12-18 11:36
pickle.html
112.36
KB
-rw-r--r--
2023-12-18 11:36
pickletools.html
16.69
KB
-rw-r--r--
2023-12-18 11:36
pipes.html
15.62
KB
-rw-r--r--
2023-12-18 11:36
pkgutil.html
31.13
KB
-rw-r--r--
2023-12-18 11:36
platform.html
32.94
KB
-rw-r--r--
2023-12-18 11:36
plistlib.html
28.6
KB
-rw-r--r--
2023-12-18 11:36
poplib.html
30.21
KB
-rw-r--r--
2023-12-18 11:36
posix.html
17.2
KB
-rw-r--r--
2023-12-18 11:36
pprint.html
40.99
KB
-rw-r--r--
2023-12-18 11:36
profile.html
70.16
KB
-rw-r--r--
2023-12-18 11:36
pty.html
17.18
KB
-rw-r--r--
2023-12-18 11:36
pwd.html
12.79
KB
-rw-r--r--
2023-12-18 11:36
py_compile.html
15.14
KB
-rw-r--r--
2023-12-18 11:36
pyclbr.html
16.13
KB
-rw-r--r--
2023-12-18 11:36
pydoc.html
15.62
KB
-rw-r--r--
2023-12-18 11:36
pyexpat.html
86.85
KB
-rw-r--r--
2023-12-18 11:36
python.html
16.73
KB
-rw-r--r--
2023-12-18 11:36
queue.html
27.54
KB
-rw-r--r--
2023-12-18 11:36
quopri.html
13.53
KB
-rw-r--r--
2023-12-18 11:36
random.html
59.22
KB
-rw-r--r--
2023-12-18 11:36
re.html
186.7
KB
-rw-r--r--
2023-12-18 11:36
readline.html
41.15
KB
-rw-r--r--
2023-12-18 11:36
reprlib.html
24.38
KB
-rw-r--r--
2023-12-18 11:36
resource.html
35.7
KB
-rw-r--r--
2023-12-18 11:36
rlcompleter.html
14.05
KB
-rw-r--r--
2023-12-18 11:36
runpy.html
25.98
KB
-rw-r--r--
2023-12-18 11:36
sched.html
19.56
KB
-rw-r--r--
2023-12-18 11:36
secrets.html
24.15
KB
-rw-r--r--
2023-12-18 11:36
select.html
61.35
KB
-rw-r--r--
2023-12-18 11:36
selectors.html
35
KB
-rw-r--r--
2023-12-18 11:36
shelve.html
28.1
KB
-rw-r--r--
2023-12-18 11:36
shlex.html
47.83
KB
-rw-r--r--
2023-12-18 11:36
shutil.html
72.47
KB
-rw-r--r--
2023-12-18 11:36
signal.html
53.77
KB
-rw-r--r--
2023-12-18 11:36
site.html
31.49
KB
-rw-r--r--
2023-12-18 11:36
smtpd.html
35.05
KB
-rw-r--r--
2023-12-18 11:36
smtplib.html
66.83
KB
-rw-r--r--
2023-12-18 11:36
sndhdr.html
12.15
KB
-rw-r--r--
2023-12-18 11:36
socket.html
191.48
KB
-rw-r--r--
2023-12-18 11:36
socketserver.html
80
KB
-rw-r--r--
2023-12-18 11:36
spwd.html
12.04
KB
-rw-r--r--
2023-12-18 11:36
sqlite3.html
158.08
KB
-rw-r--r--
2023-12-18 11:36
ssl.html
260.08
KB
-rw-r--r--
2023-12-18 11:36
stat.html
43.67
KB
-rw-r--r--
2023-12-18 11:36
statistics.html
48.88
KB
-rw-r--r--
2023-12-18 11:36
stdtypes.html
454.74
KB
-rw-r--r--
2023-12-18 11:36
string.html
93.03
KB
-rw-r--r--
2023-12-18 11:36
stringprep.html
18.22
KB
-rw-r--r--
2023-12-18 11:36
struct.html
49.9
KB
-rw-r--r--
2023-12-18 11:36
subprocess.html
138.6
KB
-rw-r--r--
2023-12-18 11:36
sunau.html
31.01
KB
-rw-r--r--
2023-12-18 11:36
superseded.html
13.46
KB
-rw-r--r--
2023-12-18 11:36
symbol.html
8.64
KB
-rw-r--r--
2023-12-18 11:36
symtable.html
25.5
KB
-rw-r--r--
2023-12-18 11:36
sys.html
138.35
KB
-rw-r--r--
2023-12-18 11:36
sysconfig.html
29.55
KB
-rw-r--r--
2023-12-18 11:36
syslog.html
20.53
KB
-rw-r--r--
2023-12-18 11:36
tabnanny.html
11.98
KB
-rw-r--r--
2023-12-18 11:36
tarfile.html
94.49
KB
-rw-r--r--
2023-12-18 11:36
telnetlib.html
29.7
KB
-rw-r--r--
2023-12-18 11:36
tempfile.html
40.42
KB
-rw-r--r--
2023-12-18 11:36
termios.html
17.75
KB
-rw-r--r--
2023-12-18 11:36
test.html
76.71
KB
-rw-r--r--
2023-12-18 11:36
text.html
13.46
KB
-rw-r--r--
2023-12-18 11:36
textwrap.html
37.11
KB
-rw-r--r--
2023-12-18 11:36
threading.html
101.04
KB
-rw-r--r--
2023-12-18 11:36
time.html
77.76
KB
-rw-r--r--
2023-12-18 11:36
timeit.html
44.19
KB
-rw-r--r--
2023-12-18 11:36
tk.html
22.75
KB
-rw-r--r--
2023-12-18 11:36
tkinter.html
80.99
KB
-rw-r--r--
2023-12-18 11:36
tkinter.scrolledtext.html
9.72
KB
-rw-r--r--
2023-12-18 11:36
tkinter.tix.html
50.64
KB
-rw-r--r--
2023-12-18 11:36
tkinter.ttk.html
108.08
KB
-rw-r--r--
2023-12-18 11:36
token.html
22.13
KB
-rw-r--r--
2023-12-18 11:36
tokenize.html
31.4
KB
-rw-r--r--
2023-12-18 11:36
trace.html
28.46
KB
-rw-r--r--
2023-12-18 11:36
traceback.html
56.24
KB
-rw-r--r--
2023-12-18 11:36
tracemalloc.html
98.77
KB
-rw-r--r--
2023-12-18 11:36
tty.html
10.29
KB
-rw-r--r--
2023-12-18 11:36
turtle.html
244.5
KB
-rw-r--r--
2023-12-18 11:36
types.html
36.19
KB
-rw-r--r--
2023-12-18 11:36
typing.html
135.91
KB
-rw-r--r--
2023-12-18 11:36
undoc.html
8.97
KB
-rw-r--r--
2023-12-18 11:36
unicodedata.html
20.61
KB
-rw-r--r--
2023-12-18 11:36
unittest.html
244.81
KB
-rw-r--r--
2023-12-18 11:36
unittest.mock-examples.html
164.2
KB
-rw-r--r--
2023-12-18 11:36
unittest.mock.html
293.06
KB
-rw-r--r--
2023-12-18 11:36
unix.html
11.5
KB
-rw-r--r--
2023-12-18 11:36
urllib.error.html
14.13
KB
-rw-r--r--
2023-12-18 11:36
urllib.html
9.34
KB
-rw-r--r--
2023-12-18 11:36
urllib.parse.html
74.54
KB
-rw-r--r--
2023-12-18 11:36
urllib.request.html
173.05
KB
-rw-r--r--
2023-12-18 11:36
urllib.robotparser.html
16.75
KB
-rw-r--r--
2023-12-18 11:36
uu.html
11.92
KB
-rw-r--r--
2023-12-18 11:36
uuid.html
31.21
KB
-rw-r--r--
2023-12-18 11:36
venv.html
72.18
KB
-rw-r--r--
2023-12-18 11:36
warnings.html
49.14
KB
-rw-r--r--
2023-12-18 11:36
wave.html
29.17
KB
-rw-r--r--
2023-12-18 11:36
weakref.html
63.76
KB
-rw-r--r--
2023-12-18 11:36
webbrowser.html
26.27
KB
-rw-r--r--
2023-12-18 11:36
windows.html
10.38
KB
-rw-r--r--
2023-12-18 11:36
winreg.html
65.17
KB
-rw-r--r--
2023-12-18 11:36
winsound.html
20.77
KB
-rw-r--r--
2023-12-18 11:36
wsgiref.html
92.28
KB
-rw-r--r--
2023-12-18 11:36
xdrlib.html
32.96
KB
-rw-r--r--
2023-12-18 11:36
xml.dom.html
95.28
KB
-rw-r--r--
2023-12-18 11:36
xml.dom.minidom.html
40.51
KB
-rw-r--r--
2023-12-18 11:36
xml.dom.pulldom.html
23.65
KB
-rw-r--r--
2023-12-18 11:36
xml.etree.elementtree.html
132.32
KB
-rw-r--r--
2023-12-18 11:36
xml.html
18.81
KB
-rw-r--r--
2023-12-18 11:36
xml.sax.handler.html
41.66
KB
-rw-r--r--
2023-12-18 11:36
xml.sax.html
24.92
KB
-rw-r--r--
2023-12-18 11:36
xml.sax.reader.html
44.79
KB
-rw-r--r--
2023-12-18 11:36
xml.sax.utils.html
16.53
KB
-rw-r--r--
2023-12-18 11:36
xmlrpc.client.html
70.26
KB
-rw-r--r--
2023-12-18 11:36
xmlrpc.html
8.33
KB
-rw-r--r--
2023-12-18 11:36
xmlrpc.server.html
48.04
KB
-rw-r--r--
2023-12-18 11:36
zipapp.html
44.05
KB
-rw-r--r--
2023-12-18 11:36
zipfile.html
78.16
KB
-rw-r--r--
2023-12-18 11:36
zipimport.html
22.51
KB
-rw-r--r--
2023-12-18 11:36
zlib.html
33.75
KB
-rw-r--r--
2023-12-18 11:36
Save
Rename
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="X-UA-Compatible" content="IE=Edge" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>10.3. operator — Standard operators as functions — Python 3.6.7 documentation</title> <link rel="stylesheet" href="../_static/pydoctheme.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../_static/sidebar.js"></script> <link rel="search" type="application/opensearchdescription+xml" title="Search within Python 3.6.7 documentation" href="../_static/opensearch.xml"/> <link rel="author" title="About these documents" href="../about.html" /> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="copyright" title="Copyright" href="../copyright.html" /> <link rel="next" title="11. File and Directory Access" href="filesys.html" /> <link rel="prev" title="10.2. functools — Higher-order functions and operations on callable objects" href="functools.html" /> <link rel="shortcut icon" type="image/png" href="../_static/py.png" /> <link rel="canonical" href="https://docs.python.org/3/library/operator.html" /> <script type="text/javascript" src="../_static/copybutton.js"></script> </head><body> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="filesys.html" title="11. File and Directory Access" accesskey="N">next</a> |</li> <li class="right" > <a href="functools.html" title="10.2. functools — Higher-order functions and operations on callable objects" accesskey="P">previous</a> |</li> <li><img src="../_static/py.png" alt="" style="vertical-align: middle; margin-top: -1px"/></li> <li><a href="https://www.python.org/">Python</a> »</li> <li> <a href="../index.html">3.6.7 Documentation</a> » </li> <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li> <li class="nav-item nav-item-2"><a href="functional.html" accesskey="U">10. Functional Programming Modules</a> »</li> <li class="right"> <div class="inline-search" style="display: none" role="search"> <form class="inline-search" action="../search.html" method="get"> <input placeholder="Quick search" type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> <script type="text/javascript">$('.inline-search').show(0);</script> | </li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="module-operator"> <span id="operator-standard-operators-as-functions"></span><h1>10.3. <a class="reference internal" href="#module-operator" title="operator: Functions corresponding to the standard operators."><code class="xref py py-mod docutils literal notranslate"><span class="pre">operator</span></code></a> — Standard operators as functions<a class="headerlink" href="#module-operator" title="Permalink to this headline">¶</a></h1> <p><strong>Source code:</strong> <a class="reference external" href="https://github.com/python/cpython/tree/3.6/Lib/operator.py">Lib/operator.py</a></p> <hr class="docutils" /> <p>The <a class="reference internal" href="#module-operator" title="operator: Functions corresponding to the standard operators."><code class="xref py py-mod docutils literal notranslate"><span class="pre">operator</span></code></a> module exports a set of efficient functions corresponding to the intrinsic operators of Python. For example, <code class="docutils literal notranslate"><span class="pre">operator.add(x,</span> <span class="pre">y)</span></code> is equivalent to the expression <code class="docutils literal notranslate"><span class="pre">x+y</span></code>. Many function names are those used for special methods, without the double underscores. For backward compatibility, many of these have a variant with the double underscores kept. The variants without the double underscores are preferred for clarity.</p> <p>The functions fall into categories that perform object comparisons, logical operations, mathematical operations and sequence operations.</p> <p>The object comparison functions are useful for all objects, and are named after the rich comparison operators they support:</p> <dl class="function"> <dt id="operator.lt"> <code class="descclassname">operator.</code><code class="descname">lt</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.lt" title="Permalink to this definition">¶</a></dt> <dt id="operator.le"> <code class="descclassname">operator.</code><code class="descname">le</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.le" title="Permalink to this definition">¶</a></dt> <dt id="operator.eq"> <code class="descclassname">operator.</code><code class="descname">eq</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.eq" title="Permalink to this definition">¶</a></dt> <dt id="operator.ne"> <code class="descclassname">operator.</code><code class="descname">ne</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.ne" title="Permalink to this definition">¶</a></dt> <dt id="operator.ge"> <code class="descclassname">operator.</code><code class="descname">ge</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.ge" title="Permalink to this definition">¶</a></dt> <dt id="operator.gt"> <code class="descclassname">operator.</code><code class="descname">gt</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.gt" title="Permalink to this definition">¶</a></dt> <dt id="operator.__lt__"> <code class="descclassname">operator.</code><code class="descname">__lt__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__lt__" title="Permalink to this definition">¶</a></dt> <dt id="operator.__le__"> <code class="descclassname">operator.</code><code class="descname">__le__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__le__" title="Permalink to this definition">¶</a></dt> <dt id="operator.__eq__"> <code class="descclassname">operator.</code><code class="descname">__eq__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__eq__" title="Permalink to this definition">¶</a></dt> <dt id="operator.__ne__"> <code class="descclassname">operator.</code><code class="descname">__ne__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__ne__" title="Permalink to this definition">¶</a></dt> <dt id="operator.__ge__"> <code class="descclassname">operator.</code><code class="descname">__ge__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__ge__" title="Permalink to this definition">¶</a></dt> <dt id="operator.__gt__"> <code class="descclassname">operator.</code><code class="descname">__gt__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__gt__" title="Permalink to this definition">¶</a></dt> <dd><p>Perform “rich comparisons” between <em>a</em> and <em>b</em>. Specifically, <code class="docutils literal notranslate"><span class="pre">lt(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre"><</span> <span class="pre">b</span></code>, <code class="docutils literal notranslate"><span class="pre">le(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre"><=</span> <span class="pre">b</span></code>, <code class="docutils literal notranslate"><span class="pre">eq(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">==</span> <span class="pre">b</span></code>, <code class="docutils literal notranslate"><span class="pre">ne(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">!=</span> <span class="pre">b</span></code>, <code class="docutils literal notranslate"><span class="pre">gt(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">></span> <span class="pre">b</span></code> and <code class="docutils literal notranslate"><span class="pre">ge(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">>=</span> <span class="pre">b</span></code>. Note that these functions can return any value, which may or may not be interpretable as a Boolean value. See <a class="reference internal" href="../reference/expressions.html#comparisons"><span class="std std-ref">Comparisons</span></a> for more information about rich comparisons.</p> </dd></dl> <p>The logical operations are also generally applicable to all objects, and support truth tests, identity tests, and boolean operations:</p> <dl class="function"> <dt id="operator.not_"> <code class="descclassname">operator.</code><code class="descname">not_</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.not_" title="Permalink to this definition">¶</a></dt> <dt id="operator.__not__"> <code class="descclassname">operator.</code><code class="descname">__not__</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__not__" title="Permalink to this definition">¶</a></dt> <dd><p>Return the outcome of <a class="reference internal" href="../reference/expressions.html#not"><code class="xref std std-keyword docutils literal notranslate"><span class="pre">not</span></code></a> <em>obj</em>. (Note that there is no <a class="reference internal" href="#operator.__not__" title="operator.__not__"><code class="xref py py-meth docutils literal notranslate"><span class="pre">__not__()</span></code></a> method for object instances; only the interpreter core defines this operation. The result is affected by the <a class="reference internal" href="../reference/datamodel.html#object.__bool__" title="object.__bool__"><code class="xref py py-meth docutils literal notranslate"><span class="pre">__bool__()</span></code></a> and <a class="reference internal" href="../reference/datamodel.html#object.__len__" title="object.__len__"><code class="xref py py-meth docutils literal notranslate"><span class="pre">__len__()</span></code></a> methods.)</p> </dd></dl> <dl class="function"> <dt id="operator.truth"> <code class="descclassname">operator.</code><code class="descname">truth</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.truth" title="Permalink to this definition">¶</a></dt> <dd><p>Return <a class="reference internal" href="constants.html#True" title="True"><code class="xref py py-const docutils literal notranslate"><span class="pre">True</span></code></a> if <em>obj</em> is true, and <a class="reference internal" href="constants.html#False" title="False"><code class="xref py py-const docutils literal notranslate"><span class="pre">False</span></code></a> otherwise. This is equivalent to using the <a class="reference internal" href="functions.html#bool" title="bool"><code class="xref py py-class docutils literal notranslate"><span class="pre">bool</span></code></a> constructor.</p> </dd></dl> <dl class="function"> <dt id="operator.is_"> <code class="descclassname">operator.</code><code class="descname">is_</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.is_" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">is</span> <span class="pre">b</span></code>. Tests object identity.</p> </dd></dl> <dl class="function"> <dt id="operator.is_not"> <code class="descclassname">operator.</code><code class="descname">is_not</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.is_not" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">is</span> <span class="pre">not</span> <span class="pre">b</span></code>. Tests object identity.</p> </dd></dl> <p>The mathematical and bitwise operations are the most numerous:</p> <dl class="function"> <dt id="operator.abs"> <code class="descclassname">operator.</code><code class="descname">abs</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.abs" title="Permalink to this definition">¶</a></dt> <dt id="operator.__abs__"> <code class="descclassname">operator.</code><code class="descname">__abs__</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__abs__" title="Permalink to this definition">¶</a></dt> <dd><p>Return the absolute value of <em>obj</em>.</p> </dd></dl> <dl class="function"> <dt id="operator.add"> <code class="descclassname">operator.</code><code class="descname">add</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.add" title="Permalink to this definition">¶</a></dt> <dt id="operator.__add__"> <code class="descclassname">operator.</code><code class="descname">__add__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__add__" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">+</span> <span class="pre">b</span></code>, for <em>a</em> and <em>b</em> numbers.</p> </dd></dl> <dl class="function"> <dt id="operator.and_"> <code class="descclassname">operator.</code><code class="descname">and_</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.and_" title="Permalink to this definition">¶</a></dt> <dt id="operator.__and__"> <code class="descclassname">operator.</code><code class="descname">__and__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__and__" title="Permalink to this definition">¶</a></dt> <dd><p>Return the bitwise and of <em>a</em> and <em>b</em>.</p> </dd></dl> <dl class="function"> <dt id="operator.floordiv"> <code class="descclassname">operator.</code><code class="descname">floordiv</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.floordiv" title="Permalink to this definition">¶</a></dt> <dt id="operator.__floordiv__"> <code class="descclassname">operator.</code><code class="descname">__floordiv__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__floordiv__" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">//</span> <span class="pre">b</span></code>.</p> </dd></dl> <dl class="function"> <dt id="operator.index"> <code class="descclassname">operator.</code><code class="descname">index</code><span class="sig-paren">(</span><em>a</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.index" title="Permalink to this definition">¶</a></dt> <dt id="operator.__index__"> <code class="descclassname">operator.</code><code class="descname">__index__</code><span class="sig-paren">(</span><em>a</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__index__" title="Permalink to this definition">¶</a></dt> <dd><p>Return <em>a</em> converted to an integer. Equivalent to <code class="docutils literal notranslate"><span class="pre">a.__index__()</span></code>.</p> </dd></dl> <dl class="function"> <dt id="operator.inv"> <code class="descclassname">operator.</code><code class="descname">inv</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.inv" title="Permalink to this definition">¶</a></dt> <dt id="operator.invert"> <code class="descclassname">operator.</code><code class="descname">invert</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.invert" title="Permalink to this definition">¶</a></dt> <dt id="operator.__inv__"> <code class="descclassname">operator.</code><code class="descname">__inv__</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__inv__" title="Permalink to this definition">¶</a></dt> <dt id="operator.__invert__"> <code class="descclassname">operator.</code><code class="descname">__invert__</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__invert__" title="Permalink to this definition">¶</a></dt> <dd><p>Return the bitwise inverse of the number <em>obj</em>. This is equivalent to <code class="docutils literal notranslate"><span class="pre">~obj</span></code>.</p> </dd></dl> <dl class="function"> <dt id="operator.lshift"> <code class="descclassname">operator.</code><code class="descname">lshift</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.lshift" title="Permalink to this definition">¶</a></dt> <dt id="operator.__lshift__"> <code class="descclassname">operator.</code><code class="descname">__lshift__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__lshift__" title="Permalink to this definition">¶</a></dt> <dd><p>Return <em>a</em> shifted left by <em>b</em>.</p> </dd></dl> <dl class="function"> <dt id="operator.mod"> <code class="descclassname">operator.</code><code class="descname">mod</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.mod" title="Permalink to this definition">¶</a></dt> <dt id="operator.__mod__"> <code class="descclassname">operator.</code><code class="descname">__mod__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__mod__" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">%</span> <span class="pre">b</span></code>.</p> </dd></dl> <dl class="function"> <dt id="operator.mul"> <code class="descclassname">operator.</code><code class="descname">mul</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.mul" title="Permalink to this definition">¶</a></dt> <dt id="operator.__mul__"> <code class="descclassname">operator.</code><code class="descname">__mul__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__mul__" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">*</span> <span class="pre">b</span></code>, for <em>a</em> and <em>b</em> numbers.</p> </dd></dl> <dl class="function"> <dt id="operator.matmul"> <code class="descclassname">operator.</code><code class="descname">matmul</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.matmul" title="Permalink to this definition">¶</a></dt> <dt id="operator.__matmul__"> <code class="descclassname">operator.</code><code class="descname">__matmul__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__matmul__" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">@</span> <span class="pre">b</span></code>.</p> <div class="versionadded"> <p><span class="versionmodified">New in version 3.5.</span></p> </div> </dd></dl> <dl class="function"> <dt id="operator.neg"> <code class="descclassname">operator.</code><code class="descname">neg</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.neg" title="Permalink to this definition">¶</a></dt> <dt id="operator.__neg__"> <code class="descclassname">operator.</code><code class="descname">__neg__</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__neg__" title="Permalink to this definition">¶</a></dt> <dd><p>Return <em>obj</em> negated (<code class="docutils literal notranslate"><span class="pre">-obj</span></code>).</p> </dd></dl> <dl class="function"> <dt id="operator.or_"> <code class="descclassname">operator.</code><code class="descname">or_</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.or_" title="Permalink to this definition">¶</a></dt> <dt id="operator.__or__"> <code class="descclassname">operator.</code><code class="descname">__or__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__or__" title="Permalink to this definition">¶</a></dt> <dd><p>Return the bitwise or of <em>a</em> and <em>b</em>.</p> </dd></dl> <dl class="function"> <dt id="operator.pos"> <code class="descclassname">operator.</code><code class="descname">pos</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.pos" title="Permalink to this definition">¶</a></dt> <dt id="operator.__pos__"> <code class="descclassname">operator.</code><code class="descname">__pos__</code><span class="sig-paren">(</span><em>obj</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__pos__" title="Permalink to this definition">¶</a></dt> <dd><p>Return <em>obj</em> positive (<code class="docutils literal notranslate"><span class="pre">+obj</span></code>).</p> </dd></dl> <dl class="function"> <dt id="operator.pow"> <code class="descclassname">operator.</code><code class="descname">pow</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.pow" title="Permalink to this definition">¶</a></dt> <dt id="operator.__pow__"> <code class="descclassname">operator.</code><code class="descname">__pow__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__pow__" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">**</span> <span class="pre">b</span></code>, for <em>a</em> and <em>b</em> numbers.</p> </dd></dl> <dl class="function"> <dt id="operator.rshift"> <code class="descclassname">operator.</code><code class="descname">rshift</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.rshift" title="Permalink to this definition">¶</a></dt> <dt id="operator.__rshift__"> <code class="descclassname">operator.</code><code class="descname">__rshift__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__rshift__" title="Permalink to this definition">¶</a></dt> <dd><p>Return <em>a</em> shifted right by <em>b</em>.</p> </dd></dl> <dl class="function"> <dt id="operator.sub"> <code class="descclassname">operator.</code><code class="descname">sub</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.sub" title="Permalink to this definition">¶</a></dt> <dt id="operator.__sub__"> <code class="descclassname">operator.</code><code class="descname">__sub__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__sub__" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">-</span> <span class="pre">b</span></code>.</p> </dd></dl> <dl class="function"> <dt id="operator.truediv"> <code class="descclassname">operator.</code><code class="descname">truediv</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.truediv" title="Permalink to this definition">¶</a></dt> <dt id="operator.__truediv__"> <code class="descclassname">operator.</code><code class="descname">__truediv__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__truediv__" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">/</span> <span class="pre">b</span></code> where 2/3 is .66 rather than 0. This is also known as “true” division.</p> </dd></dl> <dl class="function"> <dt id="operator.xor"> <code class="descclassname">operator.</code><code class="descname">xor</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.xor" title="Permalink to this definition">¶</a></dt> <dt id="operator.__xor__"> <code class="descclassname">operator.</code><code class="descname">__xor__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__xor__" title="Permalink to this definition">¶</a></dt> <dd><p>Return the bitwise exclusive or of <em>a</em> and <em>b</em>.</p> </dd></dl> <p>Operations which work with sequences (some of them with mappings too) include:</p> <dl class="function"> <dt id="operator.concat"> <code class="descclassname">operator.</code><code class="descname">concat</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.concat" title="Permalink to this definition">¶</a></dt> <dt id="operator.__concat__"> <code class="descclassname">operator.</code><code class="descname">__concat__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__concat__" title="Permalink to this definition">¶</a></dt> <dd><p>Return <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">+</span> <span class="pre">b</span></code> for <em>a</em> and <em>b</em> sequences.</p> </dd></dl> <dl class="function"> <dt id="operator.contains"> <code class="descclassname">operator.</code><code class="descname">contains</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.contains" title="Permalink to this definition">¶</a></dt> <dt id="operator.__contains__"> <code class="descclassname">operator.</code><code class="descname">__contains__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__contains__" title="Permalink to this definition">¶</a></dt> <dd><p>Return the outcome of the test <code class="docutils literal notranslate"><span class="pre">b</span> <span class="pre">in</span> <span class="pre">a</span></code>. Note the reversed operands.</p> </dd></dl> <dl class="function"> <dt id="operator.countOf"> <code class="descclassname">operator.</code><code class="descname">countOf</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.countOf" title="Permalink to this definition">¶</a></dt> <dd><p>Return the number of occurrences of <em>b</em> in <em>a</em>.</p> </dd></dl> <dl class="function"> <dt id="operator.delitem"> <code class="descclassname">operator.</code><code class="descname">delitem</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.delitem" title="Permalink to this definition">¶</a></dt> <dt id="operator.__delitem__"> <code class="descclassname">operator.</code><code class="descname">__delitem__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__delitem__" title="Permalink to this definition">¶</a></dt> <dd><p>Remove the value of <em>a</em> at index <em>b</em>.</p> </dd></dl> <dl class="function"> <dt id="operator.getitem"> <code class="descclassname">operator.</code><code class="descname">getitem</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.getitem" title="Permalink to this definition">¶</a></dt> <dt id="operator.__getitem__"> <code class="descclassname">operator.</code><code class="descname">__getitem__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__getitem__" title="Permalink to this definition">¶</a></dt> <dd><p>Return the value of <em>a</em> at index <em>b</em>.</p> </dd></dl> <dl class="function"> <dt id="operator.indexOf"> <code class="descclassname">operator.</code><code class="descname">indexOf</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.indexOf" title="Permalink to this definition">¶</a></dt> <dd><p>Return the index of the first of occurrence of <em>b</em> in <em>a</em>.</p> </dd></dl> <dl class="function"> <dt id="operator.setitem"> <code class="descclassname">operator.</code><code class="descname">setitem</code><span class="sig-paren">(</span><em>a</em>, <em>b</em>, <em>c</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.setitem" title="Permalink to this definition">¶</a></dt> <dt id="operator.__setitem__"> <code class="descclassname">operator.</code><code class="descname">__setitem__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em>, <em>c</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__setitem__" title="Permalink to this definition">¶</a></dt> <dd><p>Set the value of <em>a</em> at index <em>b</em> to <em>c</em>.</p> </dd></dl> <dl class="function"> <dt id="operator.length_hint"> <code class="descclassname">operator.</code><code class="descname">length_hint</code><span class="sig-paren">(</span><em>obj</em>, <em>default=0</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.length_hint" title="Permalink to this definition">¶</a></dt> <dd><p>Return an estimated length for the object <em>o</em>. First try to return its actual length, then an estimate using <a class="reference internal" href="../reference/datamodel.html#object.__length_hint__" title="object.__length_hint__"><code class="xref py py-meth docutils literal notranslate"><span class="pre">object.__length_hint__()</span></code></a>, and finally return the default value.</p> <div class="versionadded"> <p><span class="versionmodified">New in version 3.4.</span></p> </div> </dd></dl> <p>The <a class="reference internal" href="#module-operator" title="operator: Functions corresponding to the standard operators."><code class="xref py py-mod docutils literal notranslate"><span class="pre">operator</span></code></a> module also defines tools for generalized attribute and item lookups. These are useful for making fast field extractors as arguments for <a class="reference internal" href="functions.html#map" title="map"><code class="xref py py-func docutils literal notranslate"><span class="pre">map()</span></code></a>, <a class="reference internal" href="functions.html#sorted" title="sorted"><code class="xref py py-func docutils literal notranslate"><span class="pre">sorted()</span></code></a>, <a class="reference internal" href="itertools.html#itertools.groupby" title="itertools.groupby"><code class="xref py py-meth docutils literal notranslate"><span class="pre">itertools.groupby()</span></code></a>, or other functions that expect a function argument.</p> <dl class="function"> <dt id="operator.attrgetter"> <code class="descclassname">operator.</code><code class="descname">attrgetter</code><span class="sig-paren">(</span><em>attr</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.attrgetter" title="Permalink to this definition">¶</a></dt> <dt> <code class="descclassname">operator.</code><code class="descname">attrgetter</code><span class="sig-paren">(</span><em>*attrs</em><span class="sig-paren">)</span></dt> <dd><p>Return a callable object that fetches <em>attr</em> from its operand. If more than one attribute is requested, returns a tuple of attributes. The attribute names can also contain dots. For example:</p> <ul class="simple"> <li>After <code class="docutils literal notranslate"><span class="pre">f</span> <span class="pre">=</span> <span class="pre">attrgetter('name')</span></code>, the call <code class="docutils literal notranslate"><span class="pre">f(b)</span></code> returns <code class="docutils literal notranslate"><span class="pre">b.name</span></code>.</li> <li>After <code class="docutils literal notranslate"><span class="pre">f</span> <span class="pre">=</span> <span class="pre">attrgetter('name',</span> <span class="pre">'date')</span></code>, the call <code class="docutils literal notranslate"><span class="pre">f(b)</span></code> returns <code class="docutils literal notranslate"><span class="pre">(b.name,</span> <span class="pre">b.date)</span></code>.</li> <li>After <code class="docutils literal notranslate"><span class="pre">f</span> <span class="pre">=</span> <span class="pre">attrgetter('name.first',</span> <span class="pre">'name.last')</span></code>, the call <code class="docutils literal notranslate"><span class="pre">f(b)</span></code> returns <code class="docutils literal notranslate"><span class="pre">(b.name.first,</span> <span class="pre">b.name.last)</span></code>.</li> </ul> <p>Equivalent to:</p> <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">attrgetter</span><span class="p">(</span><span class="o">*</span><span class="n">items</span><span class="p">):</span> <span class="k">if</span> <span class="nb">any</span><span class="p">(</span><span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">item</span><span class="p">,</span> <span class="nb">str</span><span class="p">)</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">items</span><span class="p">):</span> <span class="k">raise</span> <span class="ne">TypeError</span><span class="p">(</span><span class="s1">'attribute name must be a string'</span><span class="p">)</span> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">items</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> <span class="n">attr</span> <span class="o">=</span> <span class="n">items</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="k">def</span> <span class="nf">g</span><span class="p">(</span><span class="n">obj</span><span class="p">):</span> <span class="k">return</span> <span class="n">resolve_attr</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="n">attr</span><span class="p">)</span> <span class="k">else</span><span class="p">:</span> <span class="k">def</span> <span class="nf">g</span><span class="p">(</span><span class="n">obj</span><span class="p">):</span> <span class="k">return</span> <span class="nb">tuple</span><span class="p">(</span><span class="n">resolve_attr</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="n">attr</span><span class="p">)</span> <span class="k">for</span> <span class="n">attr</span> <span class="ow">in</span> <span class="n">items</span><span class="p">)</span> <span class="k">return</span> <span class="n">g</span> <span class="k">def</span> <span class="nf">resolve_attr</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="n">attr</span><span class="p">):</span> <span class="k">for</span> <span class="n">name</span> <span class="ow">in</span> <span class="n">attr</span><span class="o">.</span><span class="n">split</span><span class="p">(</span><span class="s2">"."</span><span class="p">):</span> <span class="n">obj</span> <span class="o">=</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="n">name</span><span class="p">)</span> <span class="k">return</span> <span class="n">obj</span> </pre></div> </div> </dd></dl> <dl class="function"> <dt id="operator.itemgetter"> <code class="descclassname">operator.</code><code class="descname">itemgetter</code><span class="sig-paren">(</span><em>item</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.itemgetter" title="Permalink to this definition">¶</a></dt> <dt> <code class="descclassname">operator.</code><code class="descname">itemgetter</code><span class="sig-paren">(</span><em>*items</em><span class="sig-paren">)</span></dt> <dd><p>Return a callable object that fetches <em>item</em> from its operand using the operand’s <a class="reference internal" href="#operator.__getitem__" title="operator.__getitem__"><code class="xref py py-meth docutils literal notranslate"><span class="pre">__getitem__()</span></code></a> method. If multiple items are specified, returns a tuple of lookup values. For example:</p> <ul class="simple"> <li>After <code class="docutils literal notranslate"><span class="pre">f</span> <span class="pre">=</span> <span class="pre">itemgetter(2)</span></code>, the call <code class="docutils literal notranslate"><span class="pre">f(r)</span></code> returns <code class="docutils literal notranslate"><span class="pre">r[2]</span></code>.</li> <li>After <code class="docutils literal notranslate"><span class="pre">g</span> <span class="pre">=</span> <span class="pre">itemgetter(2,</span> <span class="pre">5,</span> <span class="pre">3)</span></code>, the call <code class="docutils literal notranslate"><span class="pre">g(r)</span></code> returns <code class="docutils literal notranslate"><span class="pre">(r[2],</span> <span class="pre">r[5],</span> <span class="pre">r[3])</span></code>.</li> </ul> <p>Equivalent to:</p> <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">itemgetter</span><span class="p">(</span><span class="o">*</span><span class="n">items</span><span class="p">):</span> <span class="k">if</span> <span class="nb">len</span><span class="p">(</span><span class="n">items</span><span class="p">)</span> <span class="o">==</span> <span class="mi">1</span><span class="p">:</span> <span class="n">item</span> <span class="o">=</span> <span class="n">items</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="k">def</span> <span class="nf">g</span><span class="p">(</span><span class="n">obj</span><span class="p">):</span> <span class="k">return</span> <span class="n">obj</span><span class="p">[</span><span class="n">item</span><span class="p">]</span> <span class="k">else</span><span class="p">:</span> <span class="k">def</span> <span class="nf">g</span><span class="p">(</span><span class="n">obj</span><span class="p">):</span> <span class="k">return</span> <span class="nb">tuple</span><span class="p">(</span><span class="n">obj</span><span class="p">[</span><span class="n">item</span><span class="p">]</span> <span class="k">for</span> <span class="n">item</span> <span class="ow">in</span> <span class="n">items</span><span class="p">)</span> <span class="k">return</span> <span class="n">g</span> </pre></div> </div> <p>The items can be any type accepted by the operand’s <a class="reference internal" href="#operator.__getitem__" title="operator.__getitem__"><code class="xref py py-meth docutils literal notranslate"><span class="pre">__getitem__()</span></code></a> method. Dictionaries accept any hashable value. Lists, tuples, and strings accept an index or a slice:</p> <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">itemgetter</span><span class="p">(</span><span class="mi">1</span><span class="p">)(</span><span class="s1">'ABCDEFG'</span><span class="p">)</span> <span class="go">'B'</span> <span class="gp">>>> </span><span class="n">itemgetter</span><span class="p">(</span><span class="mi">1</span><span class="p">,</span><span class="mi">3</span><span class="p">,</span><span class="mi">5</span><span class="p">)(</span><span class="s1">'ABCDEFG'</span><span class="p">)</span> <span class="go">('B', 'D', 'F')</span> <span class="gp">>>> </span><span class="n">itemgetter</span><span class="p">(</span><span class="nb">slice</span><span class="p">(</span><span class="mi">2</span><span class="p">,</span><span class="kc">None</span><span class="p">))(</span><span class="s1">'ABCDEFG'</span><span class="p">)</span> <span class="go">'CDEFG'</span> </pre></div> </div> <p>Example of using <a class="reference internal" href="#operator.itemgetter" title="operator.itemgetter"><code class="xref py py-func docutils literal notranslate"><span class="pre">itemgetter()</span></code></a> to retrieve specific fields from a tuple record:</p> <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">inventory</span> <span class="o">=</span> <span class="p">[(</span><span class="s1">'apple'</span><span class="p">,</span> <span class="mi">3</span><span class="p">),</span> <span class="p">(</span><span class="s1">'banana'</span><span class="p">,</span> <span class="mi">2</span><span class="p">),</span> <span class="p">(</span><span class="s1">'pear'</span><span class="p">,</span> <span class="mi">5</span><span class="p">),</span> <span class="p">(</span><span class="s1">'orange'</span><span class="p">,</span> <span class="mi">1</span><span class="p">)]</span> <span class="gp">>>> </span><span class="n">getcount</span> <span class="o">=</span> <span class="n">itemgetter</span><span class="p">(</span><span class="mi">1</span><span class="p">)</span> <span class="gp">>>> </span><span class="nb">list</span><span class="p">(</span><span class="nb">map</span><span class="p">(</span><span class="n">getcount</span><span class="p">,</span> <span class="n">inventory</span><span class="p">))</span> <span class="go">[3, 2, 5, 1]</span> <span class="gp">>>> </span><span class="nb">sorted</span><span class="p">(</span><span class="n">inventory</span><span class="p">,</span> <span class="n">key</span><span class="o">=</span><span class="n">getcount</span><span class="p">)</span> <span class="go">[('orange', 1), ('banana', 2), ('apple', 3), ('pear', 5)]</span> </pre></div> </div> </dd></dl> <dl class="function"> <dt id="operator.methodcaller"> <code class="descclassname">operator.</code><code class="descname">methodcaller</code><span class="sig-paren">(</span><em>name</em><span class="optional">[</span>, <em>args...</em><span class="optional">]</span><span class="sig-paren">)</span><a class="headerlink" href="#operator.methodcaller" title="Permalink to this definition">¶</a></dt> <dd><p>Return a callable object that calls the method <em>name</em> on its operand. If additional arguments and/or keyword arguments are given, they will be given to the method as well. For example:</p> <ul class="simple"> <li>After <code class="docutils literal notranslate"><span class="pre">f</span> <span class="pre">=</span> <span class="pre">methodcaller('name')</span></code>, the call <code class="docutils literal notranslate"><span class="pre">f(b)</span></code> returns <code class="docutils literal notranslate"><span class="pre">b.name()</span></code>.</li> <li>After <code class="docutils literal notranslate"><span class="pre">f</span> <span class="pre">=</span> <span class="pre">methodcaller('name',</span> <span class="pre">'foo',</span> <span class="pre">bar=1)</span></code>, the call <code class="docutils literal notranslate"><span class="pre">f(b)</span></code> returns <code class="docutils literal notranslate"><span class="pre">b.name('foo',</span> <span class="pre">bar=1)</span></code>.</li> </ul> <p>Equivalent to:</p> <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="k">def</span> <span class="nf">methodcaller</span><span class="p">(</span><span class="n">name</span><span class="p">,</span> <span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">):</span> <span class="k">def</span> <span class="nf">caller</span><span class="p">(</span><span class="n">obj</span><span class="p">):</span> <span class="k">return</span> <span class="nb">getattr</span><span class="p">(</span><span class="n">obj</span><span class="p">,</span> <span class="n">name</span><span class="p">)(</span><span class="o">*</span><span class="n">args</span><span class="p">,</span> <span class="o">**</span><span class="n">kwargs</span><span class="p">)</span> <span class="k">return</span> <span class="n">caller</span> </pre></div> </div> </dd></dl> <div class="section" id="mapping-operators-to-functions"> <span id="operator-map"></span><h2>10.3.1. Mapping Operators to Functions<a class="headerlink" href="#mapping-operators-to-functions" title="Permalink to this headline">¶</a></h2> <p>This table shows how abstract operations correspond to operator symbols in the Python syntax and the functions in the <a class="reference internal" href="#module-operator" title="operator: Functions corresponding to the standard operators."><code class="xref py py-mod docutils literal notranslate"><span class="pre">operator</span></code></a> module.</p> <table border="1" class="docutils"> <colgroup> <col width="26%" /> <col width="29%" /> <col width="45%" /> </colgroup> <thead valign="bottom"> <tr class="row-odd"><th class="head">Operation</th> <th class="head">Syntax</th> <th class="head">Function</th> </tr> </thead> <tbody valign="top"> <tr class="row-even"><td>Addition</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">+</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">add(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-odd"><td>Concatenation</td> <td><code class="docutils literal notranslate"><span class="pre">seq1</span> <span class="pre">+</span> <span class="pre">seq2</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">concat(seq1,</span> <span class="pre">seq2)</span></code></td> </tr> <tr class="row-even"><td>Containment Test</td> <td><code class="docutils literal notranslate"><span class="pre">obj</span> <span class="pre">in</span> <span class="pre">seq</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">contains(seq,</span> <span class="pre">obj)</span></code></td> </tr> <tr class="row-odd"><td>Division</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">/</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">truediv(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-even"><td>Division</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">//</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">floordiv(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-odd"><td>Bitwise And</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">&</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">and_(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-even"><td>Bitwise Exclusive Or</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">^</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">xor(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-odd"><td>Bitwise Inversion</td> <td><code class="docutils literal notranslate"><span class="pre">~</span> <span class="pre">a</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">invert(a)</span></code></td> </tr> <tr class="row-even"><td>Bitwise Or</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">|</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">or_(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-odd"><td>Exponentiation</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">**</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">pow(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-even"><td>Identity</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">is</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">is_(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-odd"><td>Identity</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">is</span> <span class="pre">not</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">is_not(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-even"><td>Indexed Assignment</td> <td><code class="docutils literal notranslate"><span class="pre">obj[k]</span> <span class="pre">=</span> <span class="pre">v</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">setitem(obj,</span> <span class="pre">k,</span> <span class="pre">v)</span></code></td> </tr> <tr class="row-odd"><td>Indexed Deletion</td> <td><code class="docutils literal notranslate"><span class="pre">del</span> <span class="pre">obj[k]</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">delitem(obj,</span> <span class="pre">k)</span></code></td> </tr> <tr class="row-even"><td>Indexing</td> <td><code class="docutils literal notranslate"><span class="pre">obj[k]</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">getitem(obj,</span> <span class="pre">k)</span></code></td> </tr> <tr class="row-odd"><td>Left Shift</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre"><<</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">lshift(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-even"><td>Modulo</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">%</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">mod(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-odd"><td>Multiplication</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">*</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">mul(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-even"><td>Matrix Multiplication</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">@</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">matmul(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-odd"><td>Negation (Arithmetic)</td> <td><code class="docutils literal notranslate"><span class="pre">-</span> <span class="pre">a</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">neg(a)</span></code></td> </tr> <tr class="row-even"><td>Negation (Logical)</td> <td><code class="docutils literal notranslate"><span class="pre">not</span> <span class="pre">a</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">not_(a)</span></code></td> </tr> <tr class="row-odd"><td>Positive</td> <td><code class="docutils literal notranslate"><span class="pre">+</span> <span class="pre">a</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">pos(a)</span></code></td> </tr> <tr class="row-even"><td>Right Shift</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">>></span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">rshift(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-odd"><td>Slice Assignment</td> <td><code class="docutils literal notranslate"><span class="pre">seq[i:j]</span> <span class="pre">=</span> <span class="pre">values</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">setitem(seq,</span> <span class="pre">slice(i,</span> <span class="pre">j),</span> <span class="pre">values)</span></code></td> </tr> <tr class="row-even"><td>Slice Deletion</td> <td><code class="docutils literal notranslate"><span class="pre">del</span> <span class="pre">seq[i:j]</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">delitem(seq,</span> <span class="pre">slice(i,</span> <span class="pre">j))</span></code></td> </tr> <tr class="row-odd"><td>Slicing</td> <td><code class="docutils literal notranslate"><span class="pre">seq[i:j]</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">getitem(seq,</span> <span class="pre">slice(i,</span> <span class="pre">j))</span></code></td> </tr> <tr class="row-even"><td>String Formatting</td> <td><code class="docutils literal notranslate"><span class="pre">s</span> <span class="pre">%</span> <span class="pre">obj</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">mod(s,</span> <span class="pre">obj)</span></code></td> </tr> <tr class="row-odd"><td>Subtraction</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">-</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">sub(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-even"><td>Truth Test</td> <td><code class="docutils literal notranslate"><span class="pre">obj</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">truth(obj)</span></code></td> </tr> <tr class="row-odd"><td>Ordering</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre"><</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">lt(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-even"><td>Ordering</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre"><=</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">le(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-odd"><td>Equality</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">==</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">eq(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-even"><td>Difference</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">!=</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">ne(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-odd"><td>Ordering</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">>=</span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">ge(a,</span> <span class="pre">b)</span></code></td> </tr> <tr class="row-even"><td>Ordering</td> <td><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">></span> <span class="pre">b</span></code></td> <td><code class="docutils literal notranslate"><span class="pre">gt(a,</span> <span class="pre">b)</span></code></td> </tr> </tbody> </table> </div> <div class="section" id="inplace-operators"> <h2>10.3.2. Inplace Operators<a class="headerlink" href="#inplace-operators" title="Permalink to this headline">¶</a></h2> <p>Many operations have an “in-place” version. Listed below are functions providing a more primitive access to in-place operators than the usual syntax does; for example, the <a class="reference internal" href="../glossary.html#term-statement"><span class="xref std std-term">statement</span></a> <code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">+=</span> <span class="pre">y</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">x</span> <span class="pre">=</span> <span class="pre">operator.iadd(x,</span> <span class="pre">y)</span></code>. Another way to put it is to say that <code class="docutils literal notranslate"><span class="pre">z</span> <span class="pre">=</span> <span class="pre">operator.iadd(x,</span> <span class="pre">y)</span></code> is equivalent to the compound statement <code class="docutils literal notranslate"><span class="pre">z</span> <span class="pre">=</span> <span class="pre">x;</span> <span class="pre">z</span> <span class="pre">+=</span> <span class="pre">y</span></code>.</p> <p>In those examples, note that when an in-place method is called, the computation and assignment are performed in two separate steps. The in-place functions listed below only do the first step, calling the in-place method. The second step, assignment, is not handled.</p> <p>For immutable targets such as strings, numbers, and tuples, the updated value is computed, but not assigned back to the input variable:</p> <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">a</span> <span class="o">=</span> <span class="s1">'hello'</span> <span class="gp">>>> </span><span class="n">iadd</span><span class="p">(</span><span class="n">a</span><span class="p">,</span> <span class="s1">' world'</span><span class="p">)</span> <span class="go">'hello world'</span> <span class="gp">>>> </span><span class="n">a</span> <span class="go">'hello'</span> </pre></div> </div> <p>For mutable targets such as lists and dictionaries, the inplace method will perform the update, so no subsequent assignment is necessary:</p> <div class="highlight-python3 notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="n">s</span> <span class="o">=</span> <span class="p">[</span><span class="s1">'h'</span><span class="p">,</span> <span class="s1">'e'</span><span class="p">,</span> <span class="s1">'l'</span><span class="p">,</span> <span class="s1">'l'</span><span class="p">,</span> <span class="s1">'o'</span><span class="p">]</span> <span class="gp">>>> </span><span class="n">iadd</span><span class="p">(</span><span class="n">s</span><span class="p">,</span> <span class="p">[</span><span class="s1">' '</span><span class="p">,</span> <span class="s1">'w'</span><span class="p">,</span> <span class="s1">'o'</span><span class="p">,</span> <span class="s1">'r'</span><span class="p">,</span> <span class="s1">'l'</span><span class="p">,</span> <span class="s1">'d'</span><span class="p">])</span> <span class="go">['h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd']</span> <span class="gp">>>> </span><span class="n">s</span> <span class="go">['h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd']</span> </pre></div> </div> <dl class="function"> <dt id="operator.iadd"> <code class="descclassname">operator.</code><code class="descname">iadd</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.iadd" title="Permalink to this definition">¶</a></dt> <dt id="operator.__iadd__"> <code class="descclassname">operator.</code><code class="descname">__iadd__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__iadd__" title="Permalink to this definition">¶</a></dt> <dd><p><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">iadd(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">+=</span> <span class="pre">b</span></code>.</p> </dd></dl> <dl class="function"> <dt id="operator.iand"> <code class="descclassname">operator.</code><code class="descname">iand</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.iand" title="Permalink to this definition">¶</a></dt> <dt id="operator.__iand__"> <code class="descclassname">operator.</code><code class="descname">__iand__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__iand__" title="Permalink to this definition">¶</a></dt> <dd><p><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">iand(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">&=</span> <span class="pre">b</span></code>.</p> </dd></dl> <dl class="function"> <dt id="operator.iconcat"> <code class="descclassname">operator.</code><code class="descname">iconcat</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.iconcat" title="Permalink to this definition">¶</a></dt> <dt id="operator.__iconcat__"> <code class="descclassname">operator.</code><code class="descname">__iconcat__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__iconcat__" title="Permalink to this definition">¶</a></dt> <dd><p><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">iconcat(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">+=</span> <span class="pre">b</span></code> for <em>a</em> and <em>b</em> sequences.</p> </dd></dl> <dl class="function"> <dt id="operator.ifloordiv"> <code class="descclassname">operator.</code><code class="descname">ifloordiv</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.ifloordiv" title="Permalink to this definition">¶</a></dt> <dt id="operator.__ifloordiv__"> <code class="descclassname">operator.</code><code class="descname">__ifloordiv__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__ifloordiv__" title="Permalink to this definition">¶</a></dt> <dd><p><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">ifloordiv(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">//=</span> <span class="pre">b</span></code>.</p> </dd></dl> <dl class="function"> <dt id="operator.ilshift"> <code class="descclassname">operator.</code><code class="descname">ilshift</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.ilshift" title="Permalink to this definition">¶</a></dt> <dt id="operator.__ilshift__"> <code class="descclassname">operator.</code><code class="descname">__ilshift__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__ilshift__" title="Permalink to this definition">¶</a></dt> <dd><p><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">ilshift(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre"><<=</span> <span class="pre">b</span></code>.</p> </dd></dl> <dl class="function"> <dt id="operator.imod"> <code class="descclassname">operator.</code><code class="descname">imod</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.imod" title="Permalink to this definition">¶</a></dt> <dt id="operator.__imod__"> <code class="descclassname">operator.</code><code class="descname">__imod__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__imod__" title="Permalink to this definition">¶</a></dt> <dd><p><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">imod(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">%=</span> <span class="pre">b</span></code>.</p> </dd></dl> <dl class="function"> <dt id="operator.imul"> <code class="descclassname">operator.</code><code class="descname">imul</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.imul" title="Permalink to this definition">¶</a></dt> <dt id="operator.__imul__"> <code class="descclassname">operator.</code><code class="descname">__imul__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__imul__" title="Permalink to this definition">¶</a></dt> <dd><p><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">imul(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">*=</span> <span class="pre">b</span></code>.</p> </dd></dl> <dl class="function"> <dt id="operator.imatmul"> <code class="descclassname">operator.</code><code class="descname">imatmul</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.imatmul" title="Permalink to this definition">¶</a></dt> <dt id="operator.__imatmul__"> <code class="descclassname">operator.</code><code class="descname">__imatmul__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__imatmul__" title="Permalink to this definition">¶</a></dt> <dd><p><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">imatmul(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">@=</span> <span class="pre">b</span></code>.</p> <div class="versionadded"> <p><span class="versionmodified">New in version 3.5.</span></p> </div> </dd></dl> <dl class="function"> <dt id="operator.ior"> <code class="descclassname">operator.</code><code class="descname">ior</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.ior" title="Permalink to this definition">¶</a></dt> <dt id="operator.__ior__"> <code class="descclassname">operator.</code><code class="descname">__ior__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__ior__" title="Permalink to this definition">¶</a></dt> <dd><p><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">ior(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">|=</span> <span class="pre">b</span></code>.</p> </dd></dl> <dl class="function"> <dt id="operator.ipow"> <code class="descclassname">operator.</code><code class="descname">ipow</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.ipow" title="Permalink to this definition">¶</a></dt> <dt id="operator.__ipow__"> <code class="descclassname">operator.</code><code class="descname">__ipow__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__ipow__" title="Permalink to this definition">¶</a></dt> <dd><p><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">ipow(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">**=</span> <span class="pre">b</span></code>.</p> </dd></dl> <dl class="function"> <dt id="operator.irshift"> <code class="descclassname">operator.</code><code class="descname">irshift</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.irshift" title="Permalink to this definition">¶</a></dt> <dt id="operator.__irshift__"> <code class="descclassname">operator.</code><code class="descname">__irshift__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__irshift__" title="Permalink to this definition">¶</a></dt> <dd><p><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">irshift(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">>>=</span> <span class="pre">b</span></code>.</p> </dd></dl> <dl class="function"> <dt id="operator.isub"> <code class="descclassname">operator.</code><code class="descname">isub</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.isub" title="Permalink to this definition">¶</a></dt> <dt id="operator.__isub__"> <code class="descclassname">operator.</code><code class="descname">__isub__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__isub__" title="Permalink to this definition">¶</a></dt> <dd><p><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">isub(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">-=</span> <span class="pre">b</span></code>.</p> </dd></dl> <dl class="function"> <dt id="operator.itruediv"> <code class="descclassname">operator.</code><code class="descname">itruediv</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.itruediv" title="Permalink to this definition">¶</a></dt> <dt id="operator.__itruediv__"> <code class="descclassname">operator.</code><code class="descname">__itruediv__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__itruediv__" title="Permalink to this definition">¶</a></dt> <dd><p><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">itruediv(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">/=</span> <span class="pre">b</span></code>.</p> </dd></dl> <dl class="function"> <dt id="operator.ixor"> <code class="descclassname">operator.</code><code class="descname">ixor</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.ixor" title="Permalink to this definition">¶</a></dt> <dt id="operator.__ixor__"> <code class="descclassname">operator.</code><code class="descname">__ixor__</code><span class="sig-paren">(</span><em>a</em>, <em>b</em><span class="sig-paren">)</span><a class="headerlink" href="#operator.__ixor__" title="Permalink to this definition">¶</a></dt> <dd><p><code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">ixor(a,</span> <span class="pre">b)</span></code> is equivalent to <code class="docutils literal notranslate"><span class="pre">a</span> <span class="pre">^=</span> <span class="pre">b</span></code>.</p> </dd></dl> </div> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <h3><a href="../contents.html">Table Of Contents</a></h3> <ul> <li><a class="reference internal" href="#">10.3. <code class="docutils literal notranslate"><span class="pre">operator</span></code> — Standard operators as functions</a><ul> <li><a class="reference internal" href="#mapping-operators-to-functions">10.3.1. Mapping Operators to Functions</a></li> <li><a class="reference internal" href="#inplace-operators">10.3.2. Inplace Operators</a></li> </ul> </li> </ul> <h4>Previous topic</h4> <p class="topless"><a href="functools.html" title="previous chapter">10.2. <code class="docutils literal notranslate"><span class="pre">functools</span></code> — Higher-order functions and operations on callable objects</a></p> <h4>Next topic</h4> <p class="topless"><a href="filesys.html" title="next chapter">11. File and Directory Access</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../bugs.html">Report a Bug</a></li> <li> <a href="https://github.com/python/cpython/blob/3.6/Doc/library/operator.rst" rel="nofollow">Show Source </a> </li> </ul> </div> </div> </div> <div class="clearer"></div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" >index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="filesys.html" title="11. File and Directory Access" >next</a> |</li> <li class="right" > <a href="functools.html" title="10.2. functools — Higher-order functions and operations on callable objects" >previous</a> |</li> <li><img src="../_static/py.png" alt="" style="vertical-align: middle; margin-top: -1px"/></li> <li><a href="https://www.python.org/">Python</a> »</li> <li> <a href="../index.html">3.6.7 Documentation</a> » </li> <li class="nav-item nav-item-1"><a href="index.html" >The Python Standard Library</a> »</li> <li class="nav-item nav-item-2"><a href="functional.html" >10. Functional Programming Modules</a> »</li> <li class="right"> <div class="inline-search" style="display: none" role="search"> <form class="inline-search" action="../search.html" method="get"> <input placeholder="Quick search" type="text" name="q" /> <input type="submit" value="Go" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> <script type="text/javascript">$('.inline-search').show(0);</script> | </li> </ul> </div> <div class="footer"> © <a href="../copyright.html">Copyright</a> 2001-2023, Python Software Foundation. <br /> The Python Software Foundation is a non-profit corporation. <a href="https://www.python.org/psf/donations/">Please donate.</a> <br /> Last updated on Dec 18, 2023. <a href="../bugs.html">Found a bug</a>? <br /> Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.7.6. </div> </body> </html>