id
int64
0
2.72k
content
stringlengths
5
4.1k
language
stringclasses
4 values
embedding
unknown
700
warg value For instance the following function def parrot voltage state a stiff action voom type Norwegian Blue print This parrot wouldn t action end print if you put voltage volts through it print Lovely plumage the type print It s state accepts one required argument voltage and three optional arguments state action a...
en
"Wy0wLjAxMTE4ODQ4NDcyODMzNjMzNCwwLjAwNDIxNzkxMDExNDY3NTc2LDAuMDAyMzc4MDA4MDk1NTQ3NTU3LC0wLjA1NzgwMzYzODI3OTQzODAyLC0wLjEwMTI5MzQyOTczMjMyMjY5LDAuMDQ0Mzg1NjQxODEzMjc4MiwwLjA0MDcyMzE2MzYzNDUzODY1LC0wLjA1MjYyMjc1MDQwMTQ5Njg5LDAuMDc4NzAyNzEwNTY4OTA0ODgsMC4wMzY5MTQwNTgwMjk2NTE2NCwwLjAyODQzOTU0NDE0MTI5MjU3MiwtMC4wNzA0MDU4NjM...
701
onal or keyword or keyword only 4 8 3 3 Keyword Only Arguments To mark parameters as keyword only indicating the parameters must be passed by keyword argument place an in the arguments list just before the first keyword only parameter 4 8 3 4 Function Examples Consider the following example function definitions paying ...
en
"Wy0wLjAxMTgwMDM3NTc2NzA1MjE3NCwtMC4wMTgzMzU0ODk1NTYxOTMzNTIsLTAuMDUxMjUyMTc1MTIyNDk5NDY2LC0wLjAxMTE3MDgyMTI2NDM4NjE3NywtMC4wMTY0MTI2NTExNjYzMTk4NDcsLTAuMDMxMjA3MjE2OTAzNTY3MzE0LDAuMDgzODgxOTE0NjE1NjMxMSwwLjAyMjk0MzM1MzI4MDQyNTA3LC0wLjAyNTMzNTgyNDExNzA2NDQ3NiwtMC4wMTkzNDIzMzMwNzgzODQ0LDAuMDI3MzI2NDIzNjc0ODIxODU0LDAuMDY...
702
nus earth mars venus concat earth mars venus sep earth mars venus 4 8 5 Unpacking Argument Lists The reverse situation occurs when the arguments are already in a list or tuple but need to be unpacked for a function call requiring separate positional arguments For instance the built in range function expects separate st...
en
"Wy0wLjAxMzI1ODUwOTMzNzkwMjA2OSwwLjAyNDkyMDI1MzA4MzEwOTg1NiwtMC4wMDc2MDA3NjcwNzIyOTAxODIsLTAuMDA4MjY3MTg5Mzc2MDU2MTk0LC0wLjA0OTMzNDQ4ODgwOTEwODczNCwtMC4wMTc2NTA4Mjk2MjgxMDk5MzIsMC4wMzE4NDQzNDc3MTUzNzc4MSwtMC4wNTEyNzIwMzQ2NDUwODA1NjYsLTAuMDE1NjQ0NjA2MjAyODQwODA1LDAuMDY0NzUzOTA0OTM4Njk3ODEsMC4wMDkyMDkxNTEzNzk3NjQwOCwtMC4...
703
nt an optional argument and the return value annotated def f ham str eggs str eggs str print Annotations f __annotations__ print Arguments ham eggs return ham and eggs f spam Annotations ham class str return class str eggs class str Arguments spam eggs spam and eggs 4 9 Intermezzo Coding Style Now that you are about to...
en
"Wy0wLjA0MjY0NTQ3Njc1ODQ4MDA3LDAuMDk2MTk3NDU2MTIxNDQ0NywtMC4wMzI4ODkwNzE4NTE5Njg3NjUsMC4wMDAxMDE5MjQzMzU0Njc2MjkxMywtMC4wMjI0NzM1OTk3NjE3MjQ0NzIsMC4wMjQ4OTkxODg0MjkxMTcyMDMsMC4wMjA0MTE2MTgwNTM5MTMxMTYsMC4xMDQ1MjE2MjQ3NDM5Mzg0NSwtMC4wNjQ2MzY1MDYxNDAyMzIwOSwtMC4wMzMxODU2MTYxMzU1OTcyMywtMC4wMTk0MTUzMjI2OTEyMDIxNjQsLTAuMDA...
704
uuid UUID objects according to RFC 4122 Source code Lib uuid py This module provides immutable UUID objects the UUID class and the functions uuid1 uuid3 uuid4 uuid5 for generating version 1 3 4 and 5 UUIDs as specified in RFC 4122 If all you want is a unique ID you should probably call uuid1 or uuid4 Note that uuid1 ma...
en
"Wy0wLjA2Mzg0NTEyNzgyMDk2ODYzLDAuMDAwMDUxMzU4NjEyODM2MzM4NTgsLTAuMTAwNDE3MjE5MTAyMzgyNjYsLTAuMDUxMDg2ODgzOTkxOTU2NzEsMC4wNjg1MjE4NzIxNjI4MTg5MSwtMC4wMzcyMTY1NDc4NzY1OTY0NSwwLjAyNjI5NTc3MzY4NDk3ODQ4NSwtMC4wMjc2Mjc3NzkxNzA4NzA3OCwtMC4wMjAzMzc0NzM2MDExMDI4MywtMC4wNTMyNDg2Mjg5NzM5NjA4NzYsMC4wMDEwMjMxMTQzMDk2NDYxODkyLDAuMDE...
705
f all attempts to obtain the hardware address fail we choose a random 48 bit number with the multicast bit least significant bit of the first octet set to 1 as recommended in RFC 4122 Hardware address means the MAC address of a network interface On a machine with multiple network interfaces universally administered MAC...
en
"Wy0wLjAyNDA5NTA1NjU3ODUxNjk2LDAuMDE1ODc2NjI2NTk1ODU0NzYsMC4wMTQyNTA4MzYzMzUxMjI1ODUsLTAuMDIzNDQ3NzEyODgzMzUzMjMzLDAuMDMwNzE0MTIwNzE1ODU2NTUyLC0wLjA0MDkwMTEzNTY1MzI1NzM3LDAuMDE4MjE2MDU0ODg2NTc5NTE0LC0wLjA1NTMxMDQwNTc5MDgwNTgyLDAuMDMzMTY4MjE1MzA0NjEzMTEsLTAuMDI0MDk3NzEyNzEwNDk5NzYzLC0wLjAzNTM1NTQxODkyMDUxNjk3LC0wLjAzMzM...
706
is used python m uuid generate a uuid using uuid1 python m uuid u uuid1 generate a uuid using uuid5 python m uuid u uuid5 n url N example com
et
"Wy0wLjA3NDk1Mzc2NDY3NzA0NzczLC0wLjAwMzQwNTAyMjkwMDU1MTU1NzUsLTAuMDYyMDAyNTk1NTE0MDU5MDcsMC4wMTY3NzgyNTQ4ODE1MDExOTgsLTAuMDA1MzI5ODUyOTIzNzUwODc3LC0wLjExMjc3NzcxNzQxMTUxODEsLTAuMDAwNjM5Njc2NzU2NjkxMTg3NiwtMC4wNTY2MjA3NTQzMDE1NDgwMDQsLTAuMDkyMzUxNjIyODc5NTA1MTYsLTAuMDc0NTQ5NDUxNDcwMzc1MDYsMC4wMjg4MzIzNzA0MTUzMjk5MzMsMC4...
707
1 Extending Python with C or C It is quite easy to add new built in modules to Python if you know how to program in C Such extension modules can do two things that can t be done directly in Python they can implement new built in object types and they can call C library functions and system calls To support extensions t...
en
"Wy0wLjEwMTE3NTk3ODc3OTc5Mjc5LC0wLjAxMDM0NjMxNzY2Mzc4ODc5NSwtMC4wNTQxMDg2MzgzMTYzOTI5LDAuMDMxMjU5NDAyNjMyNzEzMzIsLTAuMDE1MTk2NDQ5MTIzMzIyOTY0LC0wLjA1MzE1NjU1MDk3MzY1Mzc5LC0wLjAxNjA1NjI2MTk1NjY5MTc0MiwwLjEyMzkwNTMzMDg5NjM3NzU2LC0wLjA2NzIzMDY3MTY0NDIxMDgyLC0wLjA2Mjc4NjcyMDY5MzExMTQyLDAuMDEzNzg0NjAzMjE1NzU0MDMyLC0wLjA2MjQ...
708
arseTuple returns true nonzero if all arguments have the right type and its components have been stored in the variables whose addresses are passed It returns false zero if an invalid argument list was passed In the latter case it also raises an appropriate exception so the calling function can return NULL immediately ...
en
"Wy0wLjAzNzM1MDE5NjM5MTM0NDA3LDAuMDQwMzAxMjcwNzgyOTQ3NTQsLTAuMDcwOTk1NzEwNzkwMTU3MzIsMC4wMjgyODE1Mzc4MTU5Mjg0NiwtMC4wMzg0NzAzMjQxMjg4NjYxOTYsLTAuMDgyMzQ0ODU5ODM4NDg1NzIsMC4xMDM1NjU3NDUwNTU2NzU1LDAuMDk1OTg5MjY0NTQ3ODI0ODYsMC4wMTA5OTUyNzM0NzgzMjkxODIsMC4wMDI4MDA0MDk0NDkyNjQ0MDcsLTAuMDEyMzUyMjAzOTUwMjg1OTEyLC0wLjAwODcxMTg...
709
_ZeroDivisionError which you can use directly Of course you should choose exceptions wisely don t use PyExc_TypeError to mean that a file couldn t be opened that should probably be PyExc_OSError If something s wrong with the argument list the PyArg_ParseTuple function usually raises PyExc_TypeError If you have an argum...
en
"Wy0wLjAyNDA2OTQ0MTQ4MjQyNDczNiwtMC4wMTA1NzQ0MDYwMTI4OTI3MjMsLTAuMDc1MDI5NTE0NzI5OTc2NjUsMC4wMjg1NzU0MzE1NTU1MDk1NjcsLTAuMDQ4NjQyNzg4MDgyMzYxMjIsLTAuMDM5MDU4NDEzMzU2NTQyNTksMC4wNTcwMDM5ODk4MTU3MTE5NzUsMC4xMjQwMDk5NzQzMDA4NjEzNiwtMC4wOTM3NDEzNjQ3NzcwODgxNywtMC4wNDQ2MjY3NTc1MDI1NTU4NSwwLjA0NDY2MTU5MjY5MjEzNjc2NSwtMC4wNDA...
710
should expect the Python level parameters to be passed in as a tuple acceptable for parsing via PyArg_ParseTuple more information on this function is provided below The METH_KEYWORDS bit may be set in the third field if keyword arguments should be passed to the function In this case the C function should accept a third...
en
"Wy0wLjAxMDEzNDM2MjYxNTY0NDkzMiwtMC4wMzE4NjcyOTkyMjg5MDY2MywtMC4wODc4MzQ2OTM0OTE0NTg4OSwwLjAxNTc3MzUwNjgzNTEwMzAzNSwtMC4wOTAwNDAwMjA2NDQ2NjQ3NiwtMC4wOTM2NDA0MzE3NjE3NDE2NCwwLjA4MDUyMTIxODQ3ODY3OTY2LDAuMDcxMDE1NzUyODUxOTYzMDQsLTAuMTQwNDUxMDI4OTQzMDYxODMsLTAuMDUzNjExNDQyNDQ2NzA4NjgsMC4wNTMxODA4Njk2Njg3MjIxNSwtMC4wMzkzNDM...
711
c loading or if you want to make your module a permanent part of the Python interpreter you will have to change the configuration setup and rebuild the interpreter Luckily this is very simple on Unix just place your file spammodule c for example in the Modules directory of an unpacked source distribution add a line to ...
en
"Wy0wLjEwMjE1MjI1MDcwNzE0OTUsLTAuMDIwNDMxNjI0NzI1NDYxMDA2LC0wLjA4MTk3MDg0MDY5MjUyMDE0LDAuMDI5OTQ0Njg4MDgxNzQxMzMzLC0wLjAzMTYyMzg5OTkzNjY3NjAyNSwtMC4wNjcwMDY3NjY3OTYxMTIwNiwtNi4wODkzODQ4OTY3NjgwMjRlLTYsMC4wMjk4NzM2MzE4OTQ1ODg0NywtMC4wNDI1NDk4NDExMDU5Mzc5NiwtMC4xMTQ3MTIwNTk0OTc4MzMyNSwwLjAxNTUzMzA3OTM5MzIwODAyNywtMC4wMTg...
712
ther it is a brand new object or it is an existing object whose reference count has been incremented So unless you want to save it in a global variable you should somehow Py_DECREF the result even especially if you are not interested in its value Before you do this however it is important to check that the return value...
en
"Wy0wLjA0MzM4ODU4Mjc2NjA1NjA2LDAuMDE1MjM5MDc5NDgyODUzNDEzLC0wLjA2MzE4NTkzMDI1MjA3NTIsMC4wNDUxNjI4ODI2NTU4NTg5OTQsLTAuMTA5OTQyOTQyODU3NzQyMzEsLTAuMDM4MDQ0OTk2NTU5NjE5OTA0LDAuMDQxMDc3ODg5NTAyMDQ4NDksMC4wNjYzOTQzNTE0MjI3ODY3MSwtMC4wMzMxMTA1MTgwMDg0NzA1MzUsLTAuMDA0MDgyMDMxMDgyMzYxOTM3LDAuMDIzMDY4OTYwNzU2MDYzNDYsLTAuMDM2Njc...
713
ameters for Extension Functions The PyArg_ParseTupleAndKeywords function is declared as follows int PyArg_ParseTupleAndKeywords PyObject arg PyObject kwdict const char format char kwlist The arg and format parameters are identical to those of the PyArg_ParseTuple function The kwdict parameter is the dictionary of keywo...
en
"Wy0wLjA0NDQ0MTE5MzM0MjIwODg2LDAuMDEwMDY4Mzk3MDM3Njg0OTE3LC0wLjAwOTM4NTE3MzIwOTAxMTU1NSwwLjAwMTc5NTk5OTkzODYyMjExNywtMC4wNzUzNDcyMzcyODg5NTE4NywtMC4wNjQwNzUwMjI5MzU4NjczMSwwLjA4Njc4MDA2MzgwNzk2NDMyLDAuMDM0MTY2MjM1NDc2NzMyMjU0LC0wLjEwNjIyMzg1MTQ0MjMzNzA0LC0wLjAzMjE0NDMzNDE2NzI0MjA1LDAuMDQxMTE1MDgyODAwMzg4MzM2LDAuMDE2NTU...
714
e other hand if a program calls free for a block and then continues to use the block it creates a conflict with re use of the block through another malloc call This is called using freed memory It has the same bad consequences as referencing uninitialized data core dumps wrong results mysterious crashes Common causes o...
en
"Wy0wLjA5MjM4MjQyMzU3OTY5Mjg0LDAuMDMxNTUxNDgwMjkzMjczOTI2LC0wLjAyODY5NjAyODUxNTY5NjUyNiwwLjA2OTUwMDU3Mjk3OTQ1MDIzLDAuMDIxMDA0OTI0NTUwNjUyNTA0LC0wLjAyOTMxNDAyNDM3Mzg4ODk3LDAuMDA0MDg2MzU5ODY5Njg4NzQ5LDAuMTAwNTEwMjI0Njk5OTc0MDYsMC4xMTUxOTM2NTAxMjY0NTcyMSwwLjA1OTYwNTA3NjkwOTA2NTI1LDAuMDE1OTg3MDYwOTY0MTA3NTEzLDAuMDEzMDI4NDY...
715
en the reference is no longer needed Ownership of a reference can be transferred There are three ways to dispose of an owned reference pass it on store it or call Py_DECREF Forgetting to dispose of an owned reference creates a memory leak It is also possible to borrow 2 a reference to an object The borrower of a refere...
en
"Wy0wLjEwMTIzNDAxODgwMjY0MjgyLDAuMDIxOTI5NjEyMzgzMjQ2NDIyLC0wLjAxNjY5MDY3ODg5NDUxOTgwNiwtMC4wMzI2MDI3NjgzOTEzNzA3NywtMC4wMDI2ODU4NDU4Mjk1NDY0NTE2LC0wLjA2OTg1NDc4MTAzMTYwODU4LDAuMDMxMTQ2MzA4NDA3MTg3NDYyLDAuMDcyNjk1MTczMzIzMTU0NDUsMC4wMDk2ODA5NzYxNTk4NzA2MjUsMC4wNDIyMzU4OTU5OTEzMjUzOCwwLjAyOTA0NjIzMDAxODEzODg4NSwwLjA0NTM...
716
list 1 with the value 0 and finally prints the borrowed reference Looks harmless right But it s not Let s follow the control flow into PyList_SetItem The list owns references to all its items so when item 1 is replaced it has to dispose of the original item 1 Now let s suppose the original item 1 was an instance of a u...
en
"Wy0wLjA4ODM0NjI1NzgwNTgyNDI4LDAuMDE1NTMwOTg0ODQ4NzM3NzE3LC0wLjAwNzA5ODIxNTE2NjQ3OTM0OSwwLjAyNzEzMjc1NTE0NTQzMDU2NSwtMC4wMTkyOTI4NjEyMjMyMjA4MjUsLTAuMDUyNzI5MDc3NjM3MTk1NTksMC4xMjYyMDUzMTAyMjU0ODY3NiwwLjAxNDkzMDE2OTA5ODA3OTIwNSwtMC4wNTgwMjQwODIzMzI4NDk1LDAuMDA1MjcxMjg5OTYzMjc1MTk0LDAuMDYzMzExNDIwMzgxMDY5MTgsMC4wNDk0MTQ...
717
C compilers define this symbol 1 12 Providing a C API for an Extension Module Many extension modules just provide new functions and types to be used from Python but sometimes the code in an extension module can be useful for other extension modules For example an extension module could implement a type collection which...
en
"Wy0wLjA5NjUyNTY4Mzk5OTA2MTU4LDAuMDA5Njc3ODE4OTc2MzQyNjc4LC0wLjA3NTAxNjc0NDQzNDgzMzUzLDAuMDM3NjQ2MjA0MjMzMTY5NTU2LDAuMDAzMjY3OTQ1MjU2MDg0MjAzNywtMC4wMDkyMTc0NjUyOTYzODc2NzIsLTAuMDMzNDU0Njc1MjI3NDAzNjQsMC4wNzczMTU5MjY1NTE4MTg4NSwtMC4wMzA5NTM5MDY0NzY0OTc2NSwtMC4xMDkxNzA1NTYwNjg0MjA0MSwwLjA1Mjk5ODE0NzkwNDg3Mjg5NCwtMC4wMDE...
718
em does not call the C library function system directly but a function PySpam_System which would of course do something more complicated in reality such as adding spam to every command This function PySpam_System is also exported to other extension modules The function PySpam_System is a plain C function declared stati...
en
"Wy0wLjA0MDYyMzczNTYzNjQ3MjcsLTAuMDI0MzkyODk1NDAwNTI0MTQsLTAuMDY0OTY2NjkzNTIwNTQ1OTYsMC4wMDg5NjU3Njk3ODI2NjIzOTIsLTAuMDEzODUyMDQ0MDA4NjcyMjM3LC0wLjA3MDc3MTM2NjM1NzgwMzM0LDAuMDU0Mzk2NzQ0ODE3NDk1MzQ2LDAuMDk4OTgwNzAyNDU5ODEyMTYsLTAuMDQ0NzM0ODgwMzI4MTc4NDA2LC0wLjA2MDU3MzQ4ODQ3Mzg5MjIxLDAuMDgxMDQzNTA0MTc4NTI0MDIsLTAuMDMyMDQ...
719
Integer Objects All integers are implemented as long integer objects of arbitrary size On error most PyLong_As APIs return return type 1 which cannot be distinguished from a number Use PyErr_Occurred to disambiguate type PyLongObject Part of the Limited API as an opaque struct This subtype of PyObject represents a Pyth...
en
"WzAuMDEwMjY2MDgzMjkyNjYzMDk3LDAuMDE5NjkzNzc2OTY1MTQxMjk2LDAuMDA5NDg0NDA3NDkxOTgxOTgzLDAuMDI1ODMwMDE3NDAyNzY4MTM1LC0wLjAyMjc0MjI2Mzk3Mjc1OTI0NywtMC4wNDc4MTk1Mzk5MDQ1OTQ0MiwwLjAzODUxOTMxOTE0Njg3MTU3LC0wLjAyMjIwNTY1MjY2OTA3MjE1LC0wLjA1Njk4Mzc1Nzc2NDEwMTAzLC0wLjA2ODU2OTcwNDg5MDI1MTE2LC0wLjA2OTY3MTE0NjU3MTYzNjIsLTAuMDIzMjg...
720
call its __index__ method if present to convert it to a PyLongObject If the value of obj is greater than LONG_MAX or less than LONG_MIN set overflow to 1 or 1 respectively and return 1 otherwise set overflow to 0 If any other exception occurs set overflow to 0 and return 1 as usual Returns 1 on error Use PyErr_Occurred...
en
"Wy0wLjAxNDU2ODMxOTU0NDE5NjEyOSwwLjAyMTkzMzQ0OTQzMjI1MzgzOCwwLjAwODg3NzgyNTkyMzI2NDAyNywtMC4wMTQ3NTY2ODUxMjI4NDc1NTcsLTAuMDE3MTI4OTc3OTI0NTg1MzQyLC0wLjAzNjQzMjgxNzU3ODMxNTczNSwtMC4wNTI1ODE2MzA2NDcxODI0NjUsMC4wNTYzODI0ODg0NTkzNDg2OCwtMC4wNzUxODI5NTE5ODY3ODk3LC0wLjAyMzMwMDE0NjY4NDA1MDU2LC0wLjAxODY4NTE4MjU1NjUwOTk3LC0wLjA...
721
of PyLongObject Raise OverflowError if the value of pylong is out of range for a double Returns 1 0 on error Use PyErr_Occurred to disambiguate void PyLong_AsVoidPtr PyObject pylong Part of the Stable ABI Convert a Python integer pylong to a C void pointer If pylong cannot be converted an OverflowError will be raised ...
en
"Wy0wLjA1MDc5ODkxNTMyNjU5NTMwNiwtMC4wMDU1NjU2NDIzNzkyMjQzLC0wLjA0NjI3MzEwODU3MTc2NzgxLDAuMDM4MDUwOTcxOTI1MjU4NjM2LC0wLjA4ODg2MjM3NDQyNDkzNDM5LC0wLjA0ODUxMjkyODE4Nzg0NzE0LC0wLjAyMTc1MjU5MjE3NjE5ODk2LDAuMDczODA2MDEwMTg2NjcyMjEsLTAuMDkyMzY5NjIzNDgyMjI3MzMsLTAuMDIzNjY4Njk1MjQxMjEyODQ1LDAuMDAxMzI0MTQ3MjE4ODM4MzM0LC0wLjAwNDM...
722
General Python FAQ General Information What is Python Python is an interpreted interactive object oriented programming language It incorporates modules exceptions dynamic typing very high level dynamic data types and classes It supports multiple programming paradigms beyond object oriented programming such as procedura...
en
"Wy0wLjA0OTc5Mzg5NTMzNDAwNTM1NiwtMC4wMzgxMTgyNTA2NjgwNDg4NiwtMC4wNzM1ODAzNjkzNTMyOTQzNywwLjAyMzUxMjY1NTg2OTEyNjMyLDAuMDI5MDE1NjcxNDYxODIwNjAyLC0wLjA5MDE4NjczMDAyNzE5ODc5LDAuMDMzNzE4NDUxODU3NTY2ODMzLDAuMDc1NTUxMzk4MDk4NDY4NzgsLTAuMDYyNTQ2MDM3MTM3NTA4MzksLTAuMDA5MjAzNTAwMTE0MzgxMzEzLC0wLjA3MjczNzEyMDA5MTkxNTEzLDAuMDM1MjI...
723
c HISTORY file What is Python good for Python is a high level general purpose programming language that can be applied to many different classes of problems The language comes with a large standard library that covers areas such as string processing regular expressions Unicode calculating differences between files inte...
en
"Wy0wLjA4MDM4ODY4NzU1MTAyMTU4LC0wLjAyMTQwNzQ1NzA2ODU2MjUwOCwtMC4wMDU0NDc3ODYzMDEzNzQ0MzUsLTAuMDIwNDEwMjk5MzAxMTQ3NDYsMC4wMjM2NjMyMDA0MzgwMjI2MTQsLTAuMDM4NDE2MDQyOTIzOTI3MzEsLTAuMDQyMzEzMjI1NTY3MzQwODUsMC4wNTM0NDUwOTcwNTkwMTE0NiwtMC4wMzE2MDM5NDcyODE4Mzc0NiwtMC4wMzEzMjUwMjczNDY2MTEwMiwtMC4wMTI2OTQ5NDM2OTYyNjA0NTIsMC4wNDg...
724
h traffic receiving hundreds of postings every day and Usenet readers are often more able to cope with this volume Announcements of new software releases and events can be found in comp lang python announce a low traffic moderated list that receives about five postings per day It s available as the python announce mail...
en
"Wy0wLjAzNzkyMTM1Nzg5OTkwNDI1LC0wLjA1NzQ0ODczMzU5Nzk5Mzg1LC0wLjAyMTg5MDA5NjM2NjQwNTQ4NywwLjA0NzU3MDUxMTY5ODcyMjg0LDAuMDMyNjMwODg2ODgyNTQzNTY0LC0wLjA3NTYyODMxMDQ0MTk3MDgzLC0wLjA0ODM1MzU2Mzk5NDE2OTIzNSwwLjA0MDc5NzA3NzExOTM1MDQzLC0wLjA5ODQ5MjgyMzU0MTE2NDQsMC4wMzE2MTk0ODE3NDIzODIwNSwtMC4wNDU1MDMzMjIwMzUwNzQyMzQsMC4wODYyNzM...
725
ystem administration software in Python Companies that use Python internally include Google Yahoo and Lucasfilm Ltd What new developments are expected for Python in the future See https peps python org for the Python Enhancement Proposals PEPs PEPs are design documents describing a suggested new feature for Python prov...
en
"Wy0wLjA1OTQ3NTUyMjQ4ODM1NTY0LC0wLjAzOTA0NTc2NTk5NTk3OTMxLDAuMDEwOTk5NjIyNzU0NzUyNjM2LC0wLjA1MTQ5MDc5MTE0MTk4Njg1LC0wLjAwODQzMTIyMzIyMTEyMzIxOSwtMC4wOTg2OTkwMDM0NTgwMjMwNywtMC4wNzQ1MDUyMDI0NzIyMDk5MywwLjA3MTIyMDE5Njc4MzU0MjYzLC0wLjA1MDA4MjQxOTA2NzYyMTIzLC0wLjAzMDUwMDIwMzM3MTA0Nzk3NCwtMC4wMzY1NTg3MDYzMTMzNzE2NiwwLjA1NzU...
726
ng Tkinter Emacs users will be happy to know that there is a very good Python mode for Emacs All of these programming environments provide syntax highlighting auto indenting and access to the interactive interpreter while coding Consult the Python wiki for a full list of Python editing environments If you want to discu...
en
"Wy0wLjA5NDk4NjgxMTI4MDI1MDU1LDAuMDA5MDkwNTgzNzcxNDY3MjA5LC0wLjAwNzcyNjEwMzUzMzA1OTM1OSwwLjAyNjcxODE3ODc2Mzk4NTYzNCwwLjAwNTM0ODc1ODc3MjAxNTU3MiwtMC4wNjk2NjU1OTU4ODkwOTE0OSwtMC4wNDYyNjA2MTAyMjI4MTY0NywwLjAzMjgzMDA0NDYyNzE4OTYzNiwtMC4wMjQ3NTc1MTc1MDE3MTE4NDUsMC4wMzI2MDE4NTE5Njk5NTczNSwtMC4wMDc3ODA4MjcxMTYyMjExODk1LDAuMDU...
727
xml dom pulldom Support for building partial DOM trees Source code Lib xml dom pulldom py The xml dom pulldom module provides a pull parser which can also be asked to produce DOM accessible fragments of the document where necessary The basic concept involves pulling events from a stream of incoming XML and processing t...
en
"Wy0wLjA5ODM5NTg0Njc4NDExNDg0LC0wLjAxNjkyNzY5NDkwMTgyMzk5NywwLjAzNDE2NzUwNTgwMDcyNDAzLC0wLjAxMjcyODI5ODA4Mjk0NzczMSwwLjAyODE0MjA3OTcxMDk2MDM4OCwtMC4xMDEzNTQ1NzY2NDcyODE2NSwtMC4wNTY3ODY0NTg5MzkzMTM4OSwwLjA1NzMyMDk1MjQxNTQ2NjMxLC0wLjAxMzE4Mjc2NTgwNDIzMTE2NywtMC4wNDg1NDQzMTAwMzMzMjEzOCwwLjAyNTUyMTI2NzIwNTQ3Njc2LC0wLjAxNjM...
728
csv CSV File Reading and Writing Source code Lib csv py The so called CSV Comma Separated Values format is the most common import and export format for spreadsheets and databases CSV format was used for many years prior to attempts to describe the format in a standardized way in RFC 4180 The lack of a well defined stan...
en
"Wy0wLjA1NDE1Mzk2MDE5ODE2Mzk4NiwwLjAzNDk4NDc5NzIzOTMwMzU5LC0wLjExMjEyMzc3OTk1MjUyNjA5LC0wLjAyNzkwNzE1NzMxNjgwMzkzMiwtMC4wMzg0OTUwODYxMzM0ODAwNywtMC4wMTk2NDcyMTY0MjQzNDU5NywtMC4wNDY4NjY5MDEyMTg4OTExNDQsMC4wMzQwMzkzODkzNDIwNjk2MjYsMC4wNTc1NDAzMDEyMzM1MzAwNDUsMC4wMTkzMDE2NTg0OTYyNjA2NDMsLTAuMDAzOTc4MDM0MDE1NzQ0OTI0NSwwLjA...
729
nderful Spam csv register_dialect name dialect fmtparams Associate dialect with name name must be a string The dialect can be specified either by passing a sub class of Dialect or by fmtparams keyword arguments or both with keyword arguments overriding parameters of the dialect For full details about dialects and forma...
en
"Wy0wLjA0NzUzODUzMDA4MTUxMDU0NCwwLjAzNzk5MTU3NTg5NjczOTk2LC0wLjA3MjAzOTQxNzkyMjQ5NjgsMC4wMDY2NjUyNDUxNjQxODU3NjIsLTAuMTA5MTc0ODQ3NjAyODQ0MjQsLTAuMDQ5NTE4MTAwOTE3MzM5MzI1LDAuMDQxOTEyNjc4NjI5MTU5OTMsLTAuMDI0NDY1NTcwMjI2MzExNjg0LC0wLjAwMzkwNjYzMTg0MjI1NTU5MiwtMC4wMjQzMzIwOTY4MDAyMDgwOTIsMC4wMDMxNjgxOTE5OTM2MDkwNzA4LC0wLjA...
730
file writer csv writer csvfile dialect unix class csv excel The excel class defines the usual properties of an Excel generated CSV file It is registered with the dialect name excel class csv excel_tab The excel_tab class defines the usual properties of an Excel generated TAB delimited file It is registered with the dia...
en
"Wy0wLjA1MzczMjgwMTIyODc2MTY3LDAuMDQ4ODM5MDQwMTAwNTc0NDksLTAuMTAzNTYxMTkyNzUwOTMwNzksLTAuMDMxOTI5MzU1MTE0Njk4NDEsMC4wMDM3NDM3MzQ5MDkyMjE1MywtMC4wMzk4MTM3OTc5MjA5NDIzMDcsLTAuMDE2NDM5NTMyODYxMTEzNTUsLTAuMDAxNjAwMDE4MTIwMzcwODA1MywwLjA0MDU0MzM3NzM5OTQ0NDU4LDAuMDIwNjMyMzkzNjU4MTYxMTYzLC0wLjAzOTE1MTIwMjg4NzI5NjY4LC0wLjA3NTg...
731
es of quotechar appearing inside a field should themselves be quoted When True the character is doubled When False the escapechar is used as a prefix to the quotechar It defaults to True On output if doublequote is False and no escapechar is set Error is raised if a quotechar is found in a field Dialect escapechar A on...
en
"Wy0wLjA4MzA5NzI1NjcyMDA2NjA3LC0wLjA0NjM4MDg1ODg2ODM2MDUyLDAuMDI1MjkzODI1MTk0MjM5NjE2LDAuMDEzODYyNzA4NTgzNDc0MTYsLTAuMDMyMTE5MTYyMzgwNjk1MzQsMC4wMDY1MDYyMzQ4NzMwODYyMTQsLTAuMDAxNzQ2NDk2MTg1NjYwMzYyMiwtMC4wMDQ4MDA3NTI3MzY2MjgwNTYsMC4wNjg2NzYyNTU2NDMzNjc3NywwLjA0MzA2NDQwMDU1MzcwMzMxLDAuMDEzOTk2MzMyODgzODM0ODM5LC0wLjA0MDY...
732
imiter quoting csv QUOTE_NONE for row in reader print row The corresponding simplest possible writing example is import csv with open some csv w newline as f writer csv writer f writer writerows someiterable Since open is used to open a CSV file for reading the file will by default be decoded into unicode using the sys...
en
"Wy0wLjA0ODE5MTE5NzIxNjUxMDc3LC0wLjAzODI3OTYyNjUxODQ4NzkzLC0wLjEwMTYwNTI4MTIzMzc4NzU0LDAuMDEzNDY4NDY1NzY3ODAwODA4LC0wLjA1MTk3NzM3MzY1OTYxMDc1LC0wLjAzNTkyNzU3ODgwNjg3NzEzNiwwLjAyMzIxMjQwNDkyMTY1MDg4NywtMC4wMDU0Mjk3ODI0MzkwMjMyNTYsMC4wNDA1NTQwNjg5ODI2MDExNjYsMC4wMzMwMDMxMDY3MTMyOTQ5OCwwLjAxMTE0NjY3NDg2Mzk5NDEyMiwtMC4wMTE...
733
Data marshalling support These routines allow C code to work with serialized objects using the same data format as the marshal module There are functions to write data into the serialization format and additional functions that can be used to read the data back Files used to store marshalled data must be opened in bina...
en
"WzAuMDEzNzAzNzk3OTQzODkwMDk1LDAuMDQzNzM5OTY3MDQ4MTY4MTgsLTAuMDUzNjAxMTA4NDkxNDIwNzQ2LC0wLjA0ODU0NTY3MzQ4OTU3MDYyLC0wLjAxOTM2MzI0MTI3MDE4NDUxNywtMC4wNDAxNjc0NTgzNTU0MjY3OSwtMC4wMTc3MzMyNTkxMjY1NDQsMC4wOTQ3NDY3NzU5MjUxNTk0NSwtMC4wNjQ4MTI5MzU4ODg3NjcyNCwtMC4wMDYyODU0ODMwMTc1NjM4MiwwLjAyNTQ4NDQ1OTQ3NDY4MjgwOCwwLjAwMjIzMDU...
734
Python Language Services Python provides a number of modules to assist in working with the Python language These modules support tokenizing parsing syntax analysis bytecode disassembly and various other facilities These modules include ast Abstract Syntax Trees Abstract Grammar Node classes Root nodes Literals Variable...
en
"Wy0wLjA3NDgxOTM3MTEwNDI0MDQyLC0wLjA1NTUyNDA5NTg5MjkwNjE5LC0wLjAxNDQxNjY2MjA0NDgyMzE3LDAuMDUwNDMwMjIzMzQ1NzU2NTMsLTAuMDYxMzAwODc3NDgxNjk4OTksLTAuMTIwOTIyNDE2NDQ4NTkzMTQsMC4wMjQ4OTI4NzIxOTk0MTYxNiwwLjAxOTU2MzYyODM2MDYyOTA4LC0wLjA3MDY5OTk1MjU0Mjc4MTgzLC0wLjAyNTI1MTg2NzI0OTYwODA0LC0wLjAzODU3NTA5NDE5MzIyMDE0LC0wLjAwMjU1NDY...
735
imghdr Determine the type of an image Source code Lib imghdr py Deprecated since version 3 11 will be removed in version 3 13 The imghdr module is deprecated see PEP 594 for details and alternatives The imghdr module determines the type of image contained in a file or byte stream The imghdr module defines the following...
en
"Wy0wLjA1NDI4NTkyMTE1NjQwNjQsMC4wNTQ4ODEzOTM5MDk0NTQzNDYsLTAuMDQ0NjU5MzM4ODkxNTA2MTk1LC0wLjA3MjEzODU1NTM0NzkxOTQ2LDAuMTE5MTA2NjQyOTAxODk3NDMsLTAuMDQ3MDAwMzYzNDY5MTIzODQsMC4wNDU4MTI4NzEzMDcxMzQ2MywwLjA3MDAyNDI1MTkzNzg2NjIxLC0wLjAwNTEzMjA2MzI5MTk2NjkxNSwtMC4wMzUxNTIxNDQ3MzAwOTEwOTUsMC4wNjY4NTU1NDIzNjE3MzYzLC0wLjAxMjcwMjM...
736
Custom Python Interpreters The modules described in this chapter allow writing interfaces similar to Python s interactive interpreter If you want a Python interpreter that supports some special feature in addition to the Python language you should look at the code module The codeop module is lower level used to support...
en
"Wy0wLjA1NzkxOTg1NjE2MDg3OTEzNSwtMC4wNDI2OTIzNTk1MzY4ODYyMTUsLTAuMDM3Mzc4MTIxMTY3NDIxMzQsMC4wMzY2MTM5NTIzNjg0OTc4NSwtMC4wNzE0MzQzODYwNzQ1NDMsLTAuMDc3Mzc0NDk1NTY1ODkxMjcsMC4wMTA5Njk0NjA5NDE4NTExMzksMC4wNjkwNjM1NjY2MjUxMTgyNiwtMC4wNjU2NDAxODg3NTM2MDQ4OSwtMC4wMjc4MDc1ODk2MjAzNTE3OSwtMC4wMzcyMjkzMzY3OTgxOTEwNywtMC4wMjg2NDA...
737
grp The group database This module provides access to the Unix group database It is available on all Unix versions Availability Unix not Emscripten not WASI Group database entries are reported as a tuple like object whose attributes correspond to the members of the group structure Attribute field below see grp h Index ...
en
"Wy0wLjA2MDY5ODUwMTc2NTcyOCwtMC4wNDQ1NDEwNzk1NTA5ODE1MiwtMC4wOTU2NTQ1MTc0MTIxODU2NywwLjAzMjUwNDQ5MTUwODAwNzA1LDAuMDAzNzU1Njk3MDQ5MjAwNTM1LC0wLjAxNzQ1OTMxOTkwNDQ0NjYwMiwwLjA5ODkwNjQ3MjMyNTMyNTAxLC0wLjAwNDE3NDg1OTI2MzAwMjg3MjUsMC4wMTY3NDExOTU2OTM2MTIxLC0wLjA4MzY1MzY4ODQzMDc4NjEzLDAuMDMzNzIzNTg1MzA3NTk4MTE0LDAuMDEwMDY4OTA...
738
crypt Function to check Unix passwords Source code Lib crypt py Deprecated since version 3 11 will be removed in version 3 13 The crypt module is deprecated see PEP 594 for details and alternatives The hashlib module is a potential replacement for certain use cases The passlib package can replace all use cases of this ...
en
"Wy0wLjA2MDE0ODA4MjY3MzU0OTY1LDAuMDExMzI4NjU4MDg5MDQxNzEsLTAuMTIwNTA4OTI0MTI2NjI1MDYsLTAuMDc2NzIzMDE2Nzk4NDk2MjUsMC4wNDAxMjYzOTQ0ODA0NjY4NCwtMC4wNDEyNDI5MTI0MTE2ODk3NiwtMC4wMDA0MTUzMTI0NDY0MjEwMTIzLDAuMDE5ODkzNTE3NzE3NzE5MDc4LC0wLjAxODA1MTcwNDM5MTgzNzEyLC0wLjAxMTA0MjAwMzUxOTgzMzA4OCwwLjAxNzQ2MzE5OTc5NDI5MjQ1LDAuMDI4NTk...
739
n operation is needed to limit exposure to timing attacks hmac compare_digest is suitable for this purpose import pwd import crypt import getpass from hmac import compare_digest as compare_hash def login username input Python login cryptedpasswd pwd getpwnam username 1 if cryptedpasswd if cryptedpasswd x or cryptedpass...
en
"Wy0wLjAzOTU0MzU3MjgxMzI3MjQ3NiwwLjAxODYwNTQyNzgxNjUxMDIsLTAuMDY0NTIxMzIwMTY0MjAzNjQsLTAuMDUzNzY5Mjk3ODk3ODE1NzA0LC0wLjAzNTkyMDY3MjExODY2Mzc5LC0wLjA4NTQ2MDc2NzE0OTkyNTIzLDAuMDE0NDQ0OTc3MDQ1MDU5MjA0LC0wLjA0MzQyNTQ2Njg2NTMwMTEzLDAuMDI5MTI4ODY2MjcwMTg0NTE3LC0wLjAyODYzMDU2Mzk4OTI4MTY1NCwwLjAzNDM1NjYzMTMzODU5NjM0NCwwLjAxODk...
740
Concurrent Execution The modules described in this chapter provide support for concurrent execution of code The appropriate choice of tool will depend on the task to be executed CPU bound vs IO bound and preferred style of development event driven cooperative multitasking vs preemptive multitasking Here s an overview t...
en
"Wy0wLjA1MDMxMDcyMzQ4MzU2MjQ3LC0wLjA1ODk3MTUxNjc4ODAwNTgzLC0wLjA3NjMyMDI4MzExNDkxMDEzLC0wLjAzNjU0NDg0ODIzMzQ2MTM4LC0wLjA2ODMzOTgwMjMyNDc3MTg4LC0wLjA1NzI1MDIxMjg3Nzk4ODgxNSwwLjAxNTYyMDUzODk2NDg2NzU5MiwtMC4wMDEzNDgzMjYwOTkxMDUxNzkzLC0wLjAwNDAyMzY4NzkxNDAxMzg2MywwLjA0Mzg1MTA5NjE4MzA2MTYsLTAuMDEyNTUyMDYzOTEyMTUzMjQ0LC0wLjA...
741
unittest mock mock object library New in version 3 3 Source code Lib unittest mock py unittest mock is a library for testing in Python It allows you to replace parts of your system under test with mock objects and make assertions about how they have been used unittest mock provides a core Mock class removing the need t...
en
"Wy0wLjEyMzIyODM4NjA0NDUwMjI2LC0wLjA2NDg5NDA3MjcxMTQ2Nzc0LC0wLjA3MzM5MDU4ODE2NDMyOTUzLDAuMDIwOTI0NzYzNzU0MDEwMiwtMC4wNDUyNTEzNTA4NDk4NjY4NywtMC4wNjc5OTk0MDAxOTg0NTk2MywwLjAxMTgwMDYyMjU2NzUzNDQ0NywtMC4wNDUxOTU5NTU3ODMxMjg3NCwtMC4xMDQzNTYxMzk4OTgzMDAxNywwLjAxMjI2NjMyMDE3NjQyMjU5NiwwLjAwMTQzNzQ4MDA5NTc3MzkzNTMsMC4wMDg4NzA...
742
all the useful ones anyway The following is an example of using magic methods with the ordinary Mock class mock Mock mock __str__ Mock return_value wheeeeee str mock wheeeeee For ensuring that the mock objects in your tests have the same api as the objects they are replacing you can use auto speccing Auto speccing can...
en
"Wy0wLjEwMDI0MjA5MzIwNTQ1MTk3LC0wLjAzNjAwMzY1Mjk2MDA2MjAzLC0wLjA1MTI3NzA5NzMxNDU5NjE3NiwtMC4wMTA1ODU3NTYwNDExMDk1NjIsLTAuMTI3MjQ0NTQ3MDA5NDY4MDgsLTAuMDQ4MzU2ODM0Nzk5MDUxMjg1LC0wLjAxMDYxODk4Mzc2NzkyNjY5MywtMC4wMjk1MTYxMzk5OTkwMzIwMiwtMC4wNTg1MTcyNDc0Mzg0MzA3ODYsMC4wMTUzMjA0Njk2MjUyOTQyMDksMC4wMDU1Mjg4MDkwMzcwNTk1NDU1LC0...
743
orresponding attribute of the wrapped object so attempting to access an attribute that doesn t exist will raise an AttributeError If the mock has an explicit return_value set then calls are not passed to the wrapped object and the return_value is returned instead name If the mock has a name then it will be used in the ...
en
"Wy0wLjA4OTc1NDAwMDMwNjEyOTQ2LC0wLjAwNzk0MjEzOTE3MTA2MzksLTAuMDMwNzc0MzYyMzg1MjcyOTgsMC4wOTk0MjU1MjQ0NzMxOTAzMSwtMC4wMzg3NDMwOTM2MDk4MDk4NzUsLTAuMDYzNTQ4ODc3ODM1MjczNzQsMC4wMTYyMzUwNzIxNjU3Mjc2MTUsLTAuMDU4MTc4NDEzNjU5MzM0MTgsMC4wMDg5NjQ4NDQwNDgwMjMyMjQsMC4wMzk1NDkxMTk3NzA1MjY4ODYsMC4wNzMwNDUyMDE1OTk1OTc5MywtMC4wMjAxMjk...
744
through keyword arguments Attributes plus return values and side effects can be set on child mocks using standard dot notation and unpacking a dictionary in the method call mock Mock attrs method return_value 3 other side_effect KeyError mock configure_mock attrs mock method 3 mock other Traceback most recent call last...
en
"Wy0wLjA2MzY3NzYwODk2NjgyNzM5LDAuMDM3OTg5MTI4MzgxMDEzODcsLTAuMDA2NTE2NzY2NzM0NDIxMjUzLDAuMDM0MjcyMTIzMTI4MTc1NzM1LC0wLjAxMjQ2MjU3OTY0NTIxNjQ2NSwtMC4wNjQwMDUxMjE1ODg3MDY5NywtMC4wMDE1MzMwMzk3MjkxMTA4OTY2LC0wLjA0MzY3ODM4MDU0ODk1NDAxLC0wLjEwNDQ3OTc1OTkzMTU2NDMzLDAuMDM2MzcxMjIzNjI4NTIwOTY2LDAuMDg5Mzg0OTczMDQ5MTYzODIsLTAuMDQ...
745
4 5 mock call_args kwargs key fish next w00t call_args along with members of the lists call_args_list method_calls and mock_calls are call objects These are tuples so they can be unpacked to get at the individual arguments and make more complex assertions See calls as tuples Changed in version 3 8 Added args and kwarg...
en
"Wy0wLjA3Mjg0MDgwOTgyMjA4MjUyLC0wLjAwMTc3MzUzODc2NjQyODgyODIsLTAuMDE0MDUyMTgzMzY3MzExOTU0LC0wLjAwODMwMTU2MzU2MDk2MjY3NywtMC4wNTQxODI0NTg2Njg5NDcyMiwtMC4wNzMyNjYxNzA5MTg5NDE1LDAuMDQ4NDI4NDM0ODc4NTg3NzIsMC4wMDc3MDIwOTgyMjgwMzczNTcsLTAuMDEwMTgxODM4NjQ2NTMxMTA1LDAuMDEwOTg1MDM1NDQ5MjY2NDM0LC0wLjAxNDc2Njk5MjA2OTc4MDgyNywtMC4...
746
Therefore it can match the actual call s arguments regardless of whether they were passed positionally or by name def f a b c pass mock Mock spec f mock 1 2 c 3 Mock name mock id 140161580456576 mock assert_called_with 1 2 3 mock assert_called_with a 1 b 2 c 3 This applies to assert_called_with assert_called_once_with ...
en
"Wy0wLjA4Njc3NzU5MDIxNTIwNjE1LC0wLjAyNTE5MDcyOTY0Nzg3NDgzMiwtMC4wMzI5NjAwMDEzNzkyNTE0OCwwLjAxODU4NzMxNzMxNzcyNDIyOCwtMC4wNTc1NzgyNzY4NDI4MzI1NjUsLTAuMDIzMDgzOTg0ODUxODM3MTU4LDAuMDY2Nzg4NDk0NTg2OTQ0NTgsLTAuMDM4NDM5MjU1MjA3Nzc3MDIsLTAuMDA2NjIxNDU5NDk5MDAxNTAzLC0wLjAwOTE4MjMzMzk0NjIyODAyNywtMC4wMTM0NjIxOTg4OTgxOTYyMiwtMC4...
747
ncMock async def main args kwargs await mock args kwargs asyncio run main foo bar bar mock assert_awaited_with foo bar bar mock assert_awaited_with other Traceback most recent call last AssertionError expected call not found Expected mock other Actual mock foo bar bar assert_awaited_once_with args kwargs Assert that th...
en
"Wy0wLjA4MDA2ODQ2MTU5Njk2NTc5LC0wLjAyNjM5NDk3MDcxNTA0NTkzLC0wLjA0NTI4NTMzNjY3MzI1OTczNSwwLjEwOTIxNzE0NDU0ODg5Mjk3LC0wLjAyNjU5NzQ5MDUzNDE4NjM2MywtMC4wODQwMjAwMTg1Nzc1NzU2OCwtMC4wNjg2OTM4NDY0NjQxNTcxLC0wLjA4NzU3NTkzNDgyNzMyNzczLC0wLjAwMjI4MjE2Mjg5NTQyNjE1NCwtMC4wMzYyMTAwMTkxNDE0MzU2MiwtMC4wMzg2NjY1MDE2NDEyNzM1LC0wLjA1OTA...
748
mock to still return the default return value a new mock or any set return value then there are two ways of doing this Either return mock return_value from inside side_effect or return DEFAULT m MagicMock def side_effect args kwargs return m return_value m side_effect side_effect m return_value 3 m 3 def side_effect a...
en
"Wy0wLjA0OTE4NzYxMTc4ODUxMTI3NiwwLjAxNjAzNTUwNjUwMTc5Mzg2LC0wLjAwNDU3OTUwNjgxNDQ3OTgyOCwwLjAyMDUzNTUzOTgzNTY5MTQ1MiwtMC4wMjI4NTc0NDk5NDg3ODc2OSwtMC4wMjU5MDM3NjMyNDk1MTY0ODcsLTAuMDMxMzM3NDAyNzYwOTgyNTEsLTAuMDA0NjY2NTI4NjY0NTI5MzI0LC0wLjA2MTQzNjU4NjA4MTk4MTY2LC0wLjAwOTA0MTAwNjY3Njg1MjcwMywwLjA0ODMwMzY2MDAwNTMzMTA0LDAuMDE...
749
ace See the section where to patch unittest mock patch target new DEFAULT spec None create False spec_set None autospec None new_callable None kwargs patch acts as a function decorator class decorator or a context manager Inside the body of the function or with statement the target is patched with a new object When the...
en
"Wy0wLjA4MTIwNDkyODQ1NzczNjk3LC0wLjAzODkxNDc0MDA4NTYwMTgxLC0wLjA0MjEwNDk3NDM4OTA3NjIzLDAuMDcxNDUxNjExODE2ODgzMDksLTAuMDQ4ODIyNTM3MDY0NTUyMzEsLTAuMDAzMjc5NDc1NDk1MjE5MjMwNywwLjA4MDU5MjExODIwMzYzOTk4LC0wLjAzMzk5MTY2NDY0ODA1NjAzLC0wLjEwOTYxOTk5NzQ0MTc2ODY1LDAuMDM3NTE1MTQxMDY5ODg5MDcsMC4wMjAxNTA1ODY5NjI2OTk4OSwtMC4wOTEyNjU...
750
times you could use side_effect to return a new mock each time Alternatively you can set the return_value to be anything you want To configure return values on methods of instances on the patched class you must do this on the return_value For example class Class def method self pass with patch __main__ Class as MockCl...
en
"Wy0wLjA2NTI5NzgxMjIyMzQzNDQ1LC0wLjA0MjU1NzEzODk0OTYzMjY0NSwtMC4wMTA5Mzg4MTI5Nzg1NjU2OTMsMC4wMjU3OTIyNTc4NjAzMDI5MjUsLTAuMDU3NzM1MjM0NDk4OTc3NjYsLTAuMDE5OTQ2NTUwOTUwNDA3OTgyLC0wLjAxMTkwMDEzMTU5MDY2NDM4NywtMC4wNDMyNzQ4OTQzNTY3Mjc2LC0wLjA2OTA4MTQzMzExNzM4OTY4LDAuMDA5NjA2Mzk3NzEwNzQwNTY2LDAuMDMwNjU1OTgwMTEwMTY4NDU3LDAuMDM...
751
ionary to its original state after the test in_dict can be a dictionary or a mapping like container If it is a mapping then it must at least support getting setting and deleting items plus iterating over keys in_dict can also be a string specifying the name of the dictionary which will then be fetched by importing it v...
en
"Wy0wLjA1OTc4Njc5Mjg0NDUzMzkyLC0wLjAyODY5MTY4NDgyNzIwODUyLC0wLjA1Mjk2NTM4MDI1MTQwNzYyLC0wLjAwMTEwMzE4MTg1NzYxNTcwOTMsLTAuMDc2MzI2MjgwODMyMjkwNjUsLTAuMDc5MzE1ODI2Mjk2ODA2MzQsMC4wMjE2NzEzODQ1NzI5ODI3ODgsLTAuMDM2MjYyMDgwMDczMzU2NjMsLTAuMTE2Nzc2NDE0MjE1NTY0NzMsMC4wMjk1OTQ2MjYyNzc2ODUxNjUsMC4wNjk4ODkwNDYyNTE3NzM4MywwLjAwMjc...
752
rt isinstance other MagicMock test_function patch multiple can be nested with other patch decorators but put arguments passed by keyword after any of the standard arguments created by patch patch sys exit patch multiple __main__ thing DEFAULT other DEFAULT def test_function mock_exit other thing assert other in repr ot...
en
"Wy0wLjA1ODI1OTIwNDAzMDAzNjkyNiwtMC4wMzg1NjA3NzQxNzczMTI4NSwtMC4wMTc5OTA5NTIzNTc2NDk4MDMsMC4wMDQzNzg4MTYxMTI4NzU5MzgsLTAuMDM2Njk4NzEzODk4NjU4NzUsLTAuMDEzNDA3OTkwMzM2NDE4MTUyLDAuMDI5MDY1MzE2NTQyOTgzMDU1LC0wLjAzODQxMzkyNjk1OTAzNzc4LC0wLjExNzIzMzU4MTg0MDk5MTk3LDAuMDQyODk4MDE0MTg3ODEyODA1LDAuMDQ2Mzg5OTE4Nzc0MzY2MzgsLTAuMDI...
753
the standard way that Python applies decorators The order of the created mocks passed into your test function matches this order Where to patch patch works by temporarily changing the object that a name points to with another one There can be many names pointing to any individual object so for patching to work you must...
en
"Wy0wLjExODc5OTYxOTM3NjY1OTQsLTAuMDA4ODI3Mzg2NDIzOTQ1NDI3LDAuMDMxMTUyNTI3Nzc5MzQwNzQ0LC0wLjAwNTc0ODg4MTQ5Mjc2Mzc1OCwtMC4wMjU5NTU1NTc4MjMxODExNTIsLTAuMDQ4NzAzMDM3MjAyMzU4MjQ2LC0wLjAwOTk5NTU3MTMzNzY0MDI4NSwtMC4wOTUwMjU0Nzk3OTM1NDg1OCwtMC4wMjE5NTEwODY4MTkxNzE5MDYsMC4wMzA3OTI5NjQ2MjIzNzgzNSwwLjAyODcwNjUxNzA3MDUzMTg0NSwwLjA...
754
__set__ and __delete__ Pickling __reduce__ __reduce_ex__ __getinitargs__ __getnewargs__ __getstate__ and __setstate__ File system path representation __fspath__ Asynchronous iteration methods __aiter__ and __anext__ Changed in version 3 8 Added support for os PathLike __fspath__ Changed in version 3 8 Added support fo...
en
"Wy0wLjA2NjMwOTA3OTUyNzg1NDkyLC0wLjAyNDI2OTAyMDE4NDg3NDUzNSwtMC4wNzkxNDExOTk1ODg3NzU2MywwLjAwMDA4MDc0NjAzMTAxNzA0MjcsLTAuMDUyMTIzMzY0MDYxMTE3MTcsLTAuMDg3NzY3OTgwOTkyNzk0MDQsMC4wMTM2MDc1MTEyOTY4NjgzMjQsMC4wNjgxODg5NjUzMjA1ODcxNiwtMC4wNjI4OTc1MDMzNzYwMDcwOCwwLjAwMTU4OTI3NDE1MDMxOTM5NzQsMC4wMTMzMDEyNjkxNTEyNzAzOSwtMC4wNTk...
755
attributes now preserve their identity when they are copied or pickled Sometimes when testing you need to test that a specific object is passed as an argument to another method or returned It can be common to create named sentinel objects to test this sentinel provides a convenient way of creating and testing the iden...
en
"Wy0wLjEyOTU1NjgwNDg5NTQwMSwtMC4wMjgxMzYwNjg5NTUwNjM4MiwtMC4wMTEzOTMzMjE2NzgwNDI0MTIsMC4wOTg4NjU3Njk4MDM1MjQwMiwtMC4wMjM1MDIzMTgxODg1NDgwODgsLTAuMDYwOTk1Mzc3NjAwMTkzMDI0LDAuMDQwMTA4MTAzMzA1MTAxMzk1LC0wLjA0MDU5OTI3NTM4MDM3MywtMC4wMDA4NTU4OTcwODc2MDM4MDc0LDAuMDExMzM2MTY4Mjc0MjgzNDA5LDAuMDI0Njk3OTY2ODczNjQ1NzgyLC0wLjA2NDI...
756
NY unittest mock ANY Sometimes you may need to make assertions about some of the arguments in a call to mock but either not care about some of the arguments or want to pull them individually out of call_args and make more complex assertions on them To ignore certain arguments you can pass in objects that compare equal ...
en
"Wy0wLjA5MzQwOTMyOTY1Mjc4NjI1LC0wLjA1NDcwMzI0MzA3NjgwMTMsLTAuMDIyNzg3NzMxMTQwODUxOTc0LDAuMDMzMjExNDY1OTI0OTc4MjU2LC0wLjAzNDgwMTkzMDE4OTEzMjY5LC0wLjA1NDcwMjAxMzczMTAwMjgxLDAuMDUxMzgxOTc1NDEyMzY4Nzc0LC0wLjA2ODQzMjYxNDIwNzI2Nzc2LC0wLjA1NTc5NjEwMTY4OTMzODY4NCwtMC4wMjQ0MzcwMjMzMjY3NTQ1NywtMC4wMDY3NTQ4MTQxODE0NzY4MzE0LC0wLjA...
757
enough and fiddly enough that a helper function is useful m mock_open with patch __main__ open m with open foo w as h h write some stuff m mock_calls call foo w call __enter__ call write some stuff call __exit__ None None None m assert_called_once_with foo w handle m handle write assert_called_once_with some stuff And ...
en
"Wy0wLjA5MTk5MTA4OTI4NDQyMDAxLC0wLjA0OTMzMjE2Nzk1MzI1Mjc5LC0wLjAwMDcwOTgwMDA0OTY2MjU5LDAuMDYxODk4Mjk4NTYxNTczMDMsLTAuMDY0ODYzMjU3MTEwMTE4ODcsLTAuMDYyOTgyMDE1MzExNzE3OTksMC4wMjc0NzYwNTM2ODQ5NDk4NzUsMC4wNjU1OTQ1Njg4NDg2MDk5MiwtMC4wMjM3ODY4MTQ4ODMzNTEzMjYsMC4wMjE1NTA3NzA4NDg5ODk0ODcsMC4wMTM4Mjk4ODc4NDQ2MjIxMzUsLTAuMDI1MTc...
758
ocks req request Request foo req NonCallableMagicMock name request Request spec Request id Request objects are not callable so the return value of instantiating our mocked out request Request is a non callable mock With the spec in place any typos in our asserts will raise the correct error req add_header spam eggs Mag...
en
"Wy0wLjEwNTQ1MDk0MzExMjM3MzM1LDAuMDA4MTc0MTQ1NTk0MjM5MjM1LC0wLjAxNDU1NjMzNjIxNjYyODU1MSwwLjA2MDM0NjU0Mzc4ODkwOTkxLC0wLjAzOTcxMjc5NDEyNTA4MDExLC0wLjA5MTk4NjAwMDUzNzg3MjMxLDAuMDQyMzA2MDUwNjU4MjI2MDEsMC4wMTI2NDE5NzE5MzA4NjE0NzMsLTAuMDM1ODM0NTI4NTA1ODAyMTU1LDAuMDA1MzA3NTQ0NDg4NDU5ODI1NSwtMC4wMTkxNzk0NTU5MzU5NTUwNDgsLTAuMDk...
759
object as the autospec argument class Something def __init__ self self a 33 class SomethingForTest Something a 33 p patch __main__ Something autospec SomethingForTest mock p start mock a NonCallableMagicMock name Something a spec int id 4 This only applies to classes or already instantiated objects Calling a mocked cla...
en
"Wy0wLjA5NDc2OTExMjc2NTc4OTAzLC0wLjAyMTg5MTUzMDYwMzE3MDM5NSwtMC4wMDk4MjA3ODM1MTA4MDQxNzYsMC4wMjE1NTM1NTE3NzgxOTcyOSwtMC4wMjExOTQwOTY2NTQ2NTM1NSwtMC4wNjQ0Njg5MzUxMzIwMjY2NywwLjAyNDE2NzM0NzY5OTQwMzc2MywtMC4wNTQyMTc4Mzc3NTA5MTE3MSwtMC4wMzk0MjAyODgwNTYxMzUxOCwwLjAzNzA3MDA4ODA4ODUxMjQyLDAuMDQ3MzMyMzIwMzYyMzI5NDgsLTAuMDI3NTY...
760
What s New in Python 2 4 Author A M Kuchling This article explains the new features in Python 2 4 1 released on March 30 2005 Python 2 4 is a medium sized release It doesn t introduce as many changes as the radical Python 2 2 but introduces more features than the conservative 2 3 release The most significant new langua...
en
"Wy0wLjA0MTY3NDIwMDQ0NTQxMzU5LC0wLjAxMjQ0MjA3Mjg1MzQ0NjAwNywwLjAyNDM5Nzc2MDYyOTY1MzkzLDAuMDE3MjQzOTczOTEwODA4NTYzLC0wLjAwODY2ODA0NjQ0NDY1NDQ2NSwtMC4wNTA4Mjg5MzM3MTU4MjAzMSwtMC4xMDYyMTU2NzgxNTU0MjIyMSwwLjAyOTkxMTIxNjM0ODQwOTY1MywtMC4wNzMwODIyMTYwODQwMDM0NSwtMC4wMjQxMzAxODc5Mjg2NzY2MDUsLTAuMDI5Mjg0MzE3MDQ2NDAzODg1LDAuMDE...
761
ing all link objects in memory at the same time Generator expressions work similarly to list comprehensions but don t materialize the entire list instead they create a generator that will return elements one by one The above example could be written as links link for link in get_all_links if not link followed for link ...
en
"Wy0wLjA2MDg1NjIxNTY1NTgwMzY4LDAuMDIzNTc0NjE4NjIyNjYwNjM3LDAuMDMxMTQzNDY2MDEwNjg5NzM1LDAuMDgwNjkwNTQ3ODIzOTA1OTQsLTAuMDEzNzgyNTU4MDMxMzgwMTc3LC0wLjAxMTQ0ODQxMDMzOTY1MzQ5MiwwLjAwNjE3NjUwNDc3MjE1NjQ3NywwLjA0MDcxNjYxMDg0ODkwMzY1NiwtMC4wMjc3MjcwODYwOTcwMDIwMywtMC4wMTI0NzA5MjYxNTgxMzAxNjksMC4wMDA3OTkyMDAwMzE5MDYzNjYzLDAuMDA...
762
ine before a function definition one decorator per line and can t be on the same line as the def statement meaning that A def f is illegal You can only decorate function definitions either at the module level or inside a class you can t decorate class definitions A decorator is just a function that takes the function t...
en
"Wy0wLjA0Nzg1NTc5ODE1NTA2OTM1LDAuMDI4NTYxMDEyODE5NDA5MzcsLTAuMDE3ODkzNjU1MjI1NjM0NTc1LDAuMDMwOTU1ODUxMDc4MDMzNDQ3LC0wLjA3MDc4NTMzNjE5NjQyMjU4LC0wLjAyNjQ4ODI1NTcwOTQwOTcxNCwwLjAyMjc2MzQ0OTY5ODY4NjYsLTAuMDQyNDA0MzQ5ODkzMzMxNTMsLTAuMDgzOTU5ODg0OTQxNTc3OTEsLTAuMDM2NDgxNTM2OTI0ODM5MDIsLTAuMDQ4MzU4ODQyNzMwNTIyMTU2LC0wLjAxNzY...
763
ill be You can provide a file object or a file descriptor or you can use the constant subprocess PIPE to create a pipe between the subprocess and the parent The constructor has a number of handy options close_fds requests that all file descriptors be closed before running the subprocess cwd specifies the working direct...
en
"Wy0wLjA2MzAwNTI1MzY3MjU5OTc5LC0wLjA0NzE1MzgxOTM1MjM4ODM4LC0wLjA1MTExODA5NDQ3NDA3NzIyNSwwLjAzMDgzMDk2ODE3MTM1ODExLC0wLjA4MzI1MjY2ODM4MDczNzMsLTAuMDQ1NDMzMTA3NzYzNTI4ODI0LC0wLjA0MDQ1NDQ0NzI2OTQzOTcsMC4wODkzMzcxNDc3NzIzMTIxNiwtMC4wMDE4Mjc4NTk2Njg5OTI0NTk4LC0wLjAzODM3NzA1MDMxMDM3MzMwNiwtMC4wMzYyMjExODAxMTExNjk4MTUsLTAuMDE...
764
racy is still there and subsequent operations can magnify the error For many applications this doesn t matter If I m plotting points and displaying them on my monitor the difference between 1 1 and 1 1000000000000001 is too small to be visible Reports often limit output to a certain number of decimal places and if you ...
en
"WzAuMDA4NjA5ODkxODY5MTI3NzUsMC4wMTcyMzI3MDQ5MDc2NTU3MTYsLTAuMTI1NDk3MDcyOTM1MTA0MzcsMC4wMTAyOTI4MDg1MjUyNjQyNjMsLTAuMDA1MDg1MDE2NjAwNzg3NjQsLTAuMTA4NDIzNDA0Mzk1NTgwMjksMC4wMzM2MDE2NzE0NTcyOTA2NSwwLjA5NjcxNjQ3MTAxNjQwNzAxLC0wLjAzNzY2ODY5MDA4NTQxMTA3LDAuMDAyNjQ0NTc3MDYzNjIwMDkwNSwtMC4wMjEyMDg0NzYyNzUyMDU2MTIsLTAuMDUxMTk...
765
is selectable the module can either return a special value such as infinity or not a number or exceptions can be raised decimal Decimal 1 decimal Decimal 0 Traceback most recent call last decimal DivisionByZero x 0 decimal getcontext traps decimal DivisionByZero False decimal Decimal 1 decimal Decimal 0 Decimal Infini...
en
"Wy0wLjA4NDI3MDg0OTgyMzk1MTcyLDAuMDEwODEzMDkwMDE4OTI4MDUxLC0wLjEzOTU0NjA2NjUyMjU5ODI3LDAuMDI5Mjk4OTYzMDI1MjEyMjg4LC0wLjA1Mjk1NTM0NDMxOTM0MzU3LC0wLjA2MTQ0NDk4NjYxMTYwNDY5LDAuMDczNzUzNjQwMDU1NjU2NDMsMC4wOTI2NTExNTg1NzEyNDMyOSwtMC4wNDA0Mjg4OTU1MDMyODI1NSwtMC4wMjQ3NDY0NjgyOTA2ODY2MDcsMC4wMDMyNjg2MjA5MzA2MTIwODcyLC0wLjA1NzU...
766
EP 237 You can now put parentheses around the list of names in a from module import names statement PEP 328 The dict update method now accepts the same argument forms as the dict constructor This includes any mapping any iterable of key value pairs and keyword arguments Contributed by Raymond Hettinger The string metho...
en
"Wy0wLjA4MjU3MjkxNDY1OTk3Njk2LDAuMDM2NzMxMDQ1NjkzMTU5MSwwLjA1OTA4MTg4NTk2MzY3ODM2LC0wLjAxNTE5ODg0OTE0MTU5Nzc0OCwtMC4xMDE4NjAwOTg1NDA3ODI5MywtMC4wNDA0MTk1MjYzOTgxODE5MTUsMC4wMDIxOTk3Mjg1MDc1NDg1NzA2LDAuMTA5MDM3NjYwMDYyMzEzMDgsLTAuMTI0MjQyNzkwMDQzMzU0MDMsMC4wNjY2Njc0NzQ4MDYzMDg3NSwwLjA1MDMzNzg5NTc1MDk5OTQ1LDAuMDkwNDY4ODE...
767
makes them more suitable for use with variable length argument lists def transpose array return zip array transpose 1 2 3 4 5 6 1 4 2 5 3 6 transpose Contributed by Raymond Hettinger Encountering a failure while importing a module no longer leaves a partially initialized module object in sys modules The incomplete mod...
en
"Wy0wLjA1NjQ5OTM0NzA5MDcyMTEzLDAuMDM3Mjg5NTUyMzkwNTc1NDEsLTAuMDcwODE1NDY2MzQ0MzU2NTQsMC4wMDcyNzUxMTQzMDE1OTIxMTIsMC4wMDg0MjM1NDM1MzUxNzI5NCwtMC4wODI0NTk0NTcyMTg2NDcsMC4wMjA2OTY1ODIyNzI2NDg4MSwwLjA3NDg1NTQ5MTUxODk3NDMsLTAuMDM5OTkzMjk3MzA4NjgzMzk1LDAuMDE1MDk3ODY1ODM0ODMyMTkxLDAuMDY0NTQxODMxNjEyNTg2OTgsMC4xMTAxODU3MjAwMjY...
768
859 16 PCTP 154 and TIS 620 The UTF 8 and UTF 16 codecs now cope better with receiving partial input Previously the StreamReader class would try to read more data making it impossible to resume decoding from the stream The read method will now return as much data as it can and future calls will resume decoding where pr...
en
"Wy0wLjA4MDAxODkzMDEzNzE1NzQ0LDAuMDE3NTgxNjM0MjIzNDYxMTUsLTAuMDA4Mzg3ODIyNjU3ODIzNTYzLC0wLjAzNDY2NjQxNTMwMzk0NTU0LC0wLjA3MzcxODYyMjMyNjg1MDg5LC0wLjAzNzI2NDM0MzM1MTEyNTcyLDAuMDQ1OTI1ODA3MjA3ODIyOCwtMC4wMzY4NTQ0MDEyMzA4MTIwNywwLjAyMzAyMDc3NTk4ODY5ODAwNiwtMC4wMzQzNDMxNzkzMTUzMjg2LDAuMDI3ODM2ODU5MjI2MjI2ODA3LDAuMDYxMTkwNzE...
769
for k g in itertools groupby letters print k list g a a a a a a b b b c c d d r r r List unique letters k for k g in groupby letters a b c d r Count letter occurrences k len list g for k g in groupby letters a 5 b 2 c 1 d 1 r 2 Contributed by Hye Shik Chang itertools also gained a function named tee iterator N that ret...
en
"Wy0wLjA0MDEyMTg3NTcwMzMzNDgxLC0wLjAyNTI3MjE5MjQzMzQ3NjQ0OCwwLjAxNDc0NjM0OTMwNDkxNDQ3NCwtMC4wMDAwNTQ2NTc2NDg0MzM5MzExNywtMC4wMTM1OTkxMjAwODA0NzEwMzksLTAuMDM1ODQ5NTk3MzA1MDU5NDMsMC4wMjU3MjU5MzI3OTE4MjkxMSwtMC4wMzg4MjUwOTg0MjUxNDk5MiwtMC4wODcyODkzNzA1OTY0MDg4NCwwLjAxMDIxNjU5NDY3MzY5MzE4LDAuMDI0OTU2MDgxMDYyNTU1MzEzLDAuMDI...
770
path exists whether or not it s a symbolic link This differs from the existing os path exists path function which returns false if path is a symlink that points to a destination that doesn t exist Contributed by Beni Cherniavsky A new getsid function was added to the posix module that underlies the os module Contribute...
en
"Wy0wLjA4NzQ3NjA4MjE0NjE2Nzc2LC0wLjAzNzgyMTk4OTUwNjQ4MzA4LC0wLjA1MDQ2MTI2MjQ2NDUyMzMxNSwtMC4wMDgzMTUyNTQwMDI4MDk1MjUsMC4wMDc2Nzg3Nzg4NDIwOTE1NiwtMC4wMzU5MjM2Nzg0Mjc5MzQ2NSwwLjA2NDMzNDMyNTQ5MjM4MjA1LC0wLjAwOTIyOTkxNjE0Nzg4NzcwNywwLjA2NTI3NTM0ODcyMjkzNDcyLC0wLjA2MDU5MzAwODk5NTA1NjE1LDAuMDE0NTg1Nzc0MzkxODg5NTcyLDAuMDY2NzI...
771
sessions two implementations of cookie jars are provided one that stores cookies in the Netscape format so applications can use the Mozilla or Lynx cookie files and one that stores cookies in the same format as the Perl libwww library urllib2 has been changed to interact with cookielib HTTPCookieProcessor manages a coo...
en
"Wy0wLjA2NjEzMzg0OTMyMjc5NTg3LDAuMDQ3Mjg5Mzk3NTY3NTEwNjA1LC0wLjA2MDk0ODIxMTY5OTcyNDIsMC4wMjAzNDA3Mjk1MDQ4MjM2ODUsMC4wMDc4ODQ0MTY3MjkyMTE4MDcsLTAuMDU3NzA5MTM1MTE1MTQ2NjQsMC4wMDg2NjM2Mzc1NjM1ODYyMzUsMC4wMTIzODYxMjE3ODcxMzA4MzMsLTAuMDQxNDEzOTk2MzY4NjQ2NjIsMC4wMDY1OTU0MDQzNTI5OTI3NzMsLTAuMDIzOTQ3MzQ2OTU1NTM3Nzk2LDAuMDIyMDE...
772
s slightly misnamed because the profiling feature also works on the PowerPC platform though that processor architecture doesn t call that register the TSC register Contributed by Jeremy Hylton The tracebackobject type has been renamed to PyTracebackObject Port Specific Changes The Windows port now builds under MSVC 7 1...
en
"Wy0wLjA4ODUwNTYxODI3NDIxMTg4LDAuMDAxNTk0MzE1ODY1MDc3MDc4MywtMC4wNzU3MTYzNzYzMDQ2MjY0NiwwLjE0MzU5MDg4MjQyMDUzOTg2LDAuMDM3ODY2NDA2MTQyNzExNjQsLTAuMDU2Njg1NzMwODE0OTMzNzgsLTAuMDQ3NTUzOTA4MDc5ODYyNTk1LDAuMDg0MjQzOTgzMDMwMzE5MjEsLTAuMTEyNTk3MzA5MDUyOTQ0MTgsLTAuMDE4NDc3MjQ4MDI3OTIwNzIzLC0wLjA0ODE3MjI2OTAxNjUwNDI5LDAuMDExNzk...
773
abc Abstract Base Classes Source code Lib abc py This module provides the infrastructure for defining abstract base classes ABCs in Python as outlined in PEP 3119 see the PEP for why this was added to Python See also PEP 3141 and the numbers module regarding a type hierarchy for numbers based on ABCs The collections mo...
en
"Wy0wLjA3NTM4NTMxNzIwNjM4Mjc1LC0wLjAwMzkxNDE5ODM3MjUxMzA1NiwtMC4wMzE1MzM4NzQ1NzEzMjMzOTUsLTAuMDIyNjA5MjQ2ODk0NzE3MjE2LC0wLjA5ODY4MzI5NzYzNDEyNDc2LC0wLjA0NTQxOTQyMTA0Njk3MjI3NSwtMC4wMTM5Nzg0NDIxNzcxNzY0NzYsMC4wNTEzNTA5MzI1NjgzMTE2OSwtMC4wNzE2OTEyMTUwMzgyOTk1NiwtMC4wODUzMjg3NjUyMTM0ODk1MywtMC4wNDIwMjM5NTMwNTAzNzQ5ODUsLTA...
774
makes Foo a virtual subclass of MyIterable even though it does not define an __iter__ method it uses the old style iterable protocol defined in terms of __len__ and __getitem__ Note that this will not make get_iterator available as a method of Foo so it is provided separately The abc module also provides the following ...
en
"Wy0wLjA2NDc2NTQ2MDc4OTIwMzY0LDAuMDQ1Nzg1Njg0MTM4NTM2NDUsLTAuMDIzODQyNzcyNDY4OTI0NTIyLDQuNzgxMzQ3Nzk3Njg4Nzk1ZS02LC0wLjA2MjQxMTAyODg5MTgwMTgzNCwtMC4wMTg5NTg1ODUzMzY4MDQzOSwtMC4wMDYzMjczNTAxNTgyNDQzNzEsMC4wMjgyMzc5NDgxOTQxNDYxNTYsLTAuMDg2NzA4MjQ3NjYxNTkwNTgsLTAuMDQ0MTg5ODgxNTMzMzg0MzIsLTAuMDIwMjYyNTUyNDI1MjY1MzEyLC0wLjA...
775
he underlying methods as abstract class C ABC property def x self x setter abstractmethod def x self val If only some components are abstract only those components need to be updated to create a concrete property in a subclass class D C C x setter def x self val The abc module also provides the following functions abc ...
en
"Wy0wLjA4ODc2NjQ3ODAwMjA3MTM4LDAuMDEzMDM4ODQzODcwMTYyOTY0LC0wLjAxNDczNzkxOTkwNDI5MTYzLC0wLjAzNjIzODY0NDI3MjA4OTAwNSwtMC4xMDYxNjE4MzI4MDk0NDgyNCwtMC4wNTk2NzUwMTU1MDkxMjg1NywwLjAwNjE3NTM5NjQ5ODI5MjY4NDYsLTAuMDA0NzAyMDIwNDM2NTI1MzQ1LC0wLjAzODQ2NDAyNDY2Mjk3MTUsLTAuMDIzNjA1MzgyMDY5OTQ1MzM1LC0wLjAwOTAzMzMyNDE5NjkzNDcsLTAuMDU...
776
_thread Low level threading API This module provides low level primitives for working with multiple threads also called light weight processes or tasks multiple threads of control sharing their global data space For synchronization simple locks also called mutexes or binary semaphores are provided The threading module ...
en
"Wy0wLjExNTM1OTUyMjQwMjI4NjUzLC0wLjA0MDg0MzIwMzY2MzgyNTk5LC0wLjA0MDk2MTMyNTE2ODYwOTYyLDAuMDEyNjg2NTk5MDQ1OTkxODk4LC0wLjAyNzUzNzQ3ODEzNDAzNjA2NCwtMC4wNDUyNzcyNzg4NzAzNDQxNiwwLjAwNTM0OTE4NzE4MDM5OTg5NSwwLjAwMDk0MzQwMDI1NjgwMTM5NjYsMC4wMjcyMTk0ODczNTQxNTkzNTUsLTAuMDAxMjM3Nzk0OTg5NzE5OTg3LDAuMDE1Mjc5MDE1NTI2MTc1NDk5LC0wLjA...
777
size is the suggested approach in the absence of more specific information Availability Windows pthreads Unix platforms with POSIX threads support _thread TIMEOUT_MAX The maximum value allowed for the timeout parameter of Lock acquire Specifying a timeout greater than this value will raise an OverflowError New in versi...
en
"Wy0wLjA4NDQxNDA2NDg4NDE4NTc5LDAuMDAxNDIyODc0NjI5NDk3NTI4LC0wLjAzNzQyNTgzNDY4NTU2NDA0LC0wLjAxOTQ0MTI1MjU3NDMyNDYwOCwtMC4wMjMyMjM0OTMyNDgyMjQyNiwwLjAxNTMyMTIzNTE3MjQ1MDU0MiwtMC4wMTI0OTgwNDcyMDI4MjU1NDYsLTAuMDI3ODEzMjgxODYzOTI3ODQsMC4wODYwMjUzMTI1NDI5MTUzNCwwLjAyNTY5NzE0MDAyMzExMjI5NywwLjA0MjM2OTM1ODI0MTU1ODA3NSwwLjAxMjc...
778
select Waiting for I O completion This module provides access to the select and poll functions available in most operating systems devpoll available on Solaris and derivatives epoll available on Linux 2 5 and kqueue available on most BSD Note that on Windows it only works for sockets on other operating systems it also ...
en
"Wy0wLjA0MzAwMjU5NDI2MjM2MTUyNiwtMC4wMjM4ODgxMzcxOTE1MzQwNDIsLTAuMDcxODE1NzQ0MDQyMzk2NTUsMC4wNTY2MzUwNDA3ODk4NDI2MDYsMC4wNDY1MjIwMzk5MjAwOTE2MywtMC4xMTc1NTI5MTM3MjUzNzYxMywwLjA5OTgzNDEzNjY2NDg2NzQsMC4wMTkxMDMxOTE3OTI5NjQ5MzUsLTAuMDA1MTI4ODczOTc3ODEwMTQ0LDAuMDQ5Mjg5MzA0NzYzMDc4NjksMC4wMDY1MTU4NDc5ODQ3MDEzOTUsLTAuMDA3MjI...
779
tform dependent It is known to work on Unix but not on Windows The optional timeout argument specifies a time out as a floating point number in seconds When the timeout argument is omitted the function blocks until at least one file descriptor is ready A time out value of zero specifies a poll and never blocks The retu...
en
"Wy0wLjA5MzI4NjY5MzA5NjE2MDg5LDAuMDE0ODMzNjY1NDUyODk3NTQ5LC0wLjA3MDIzNzkxOTY4ODIyNDc5LDAuMDYyODQxNjUzODIzODUyNTQsLTAuMDE1Mjk4MDAzMzMwODI2NzYsMC4wMTc5NDk2ODU0NTQzNjg1OSwwLjAxMDEwMTg1NTczMjUwMDU1MywwLjA1NjIxNzc2MzU3MjkzMTI5LDAuMDQ4ODc0Njc2MjI3NTY5NTgsMC4wMTUxMDI0NzQ5NTAyNTM5NjMsLTAuMDA1NDY2NjAxMzQ1Njg4MTA1LDAuMDI5NjI1MTg...
780
pted by a signal except if the signal handler raises an exception see PEP 475 for the rationale instead of raising InterruptedError Edge and Level Trigger Polling epoll Objects https linux die net man 4 epoll eventmask Constant Meaning EPOLLIN Available for read EPOLLOUT Available for write EPOLLPRI Urgent data for rea...
en
"WzAuMDEzODYxNDMxNzQwMjI0MzYxLC0wLjAzMTczNTYwNjQ5MTU2NTcwNCwtMC4wMTYzMzczODkxMjY0MjAwMiwtMC4wMDQ2MjIzMDM4ODA3NTExMzMsMC4wNjE2MzMyNDA0MzE1NDcxNjUsMC4wNTQzMzExOTQ2MDk0MDM2MSwwLjAzNTE3NDUxMTM3MzA0MzA2LDAuMDY2ODM1NDAzNDQyMzgyODEsMC4wMTUwMjIyNzg3NjMzNTM4MjUsMC4wNTEwMTkxMjQ2ODY3MTc5OSwwLjAyNDU3Nzc3OTY5NTM5MTY1NSwtMC4wMDE4NDY...
781
ples for the descriptors that have events or errors to report fd is the file descriptor and event is a bitmask with bits set for the reported events for that descriptor POLLIN for waiting input POLLOUT to indicate that the descriptor can be written to and so forth An empty list indicates that the call timed out and no ...
en
"Wy0wLjA0MjkyNjkyMjQ0MDUyODg3LDAuMDA4ODE5NjQ1MjcwNzA1MjIzLC0wLjA2MjAzOTIzMDAxODg1NDE0LDAuMDI4MzY3NzIyNDA2OTgzMzc2LDAuMDIwNDM4MzU0NDYyMzg1MTc4LDAuMDM0ODQ3NDM0NjEwMTI4NCwwLjAxMzQzNzEwODEzNjcxMzUwNSwwLjA1MDYwNTcxNDMyMTEzNjQ3NSwwLjA3MTIwMjQ5NDIwNDA0NDM0LDAuMDM3MTUzODY2MTQyMDM0NTMsMC4wMDU3MTYyMTQ0MjIxMzY1NDUsLTAuMDM4MzE0MzU...
782
hmac Keyed Hashing for Message Authentication Source code Lib hmac py This module implements the HMAC algorithm as described by RFC 2104 hmac new key msg None digestmod Return a new hmac object key is a bytes or bytearray object giving the secret key If msg is present the method call update msg is made digestmod is the...
en
"Wy0wLjAwMDQyMTU2Nzk2NTUzMTcyMTcsLTAuMDExNDI5NzU0MDg1ODM4Nzk1LC0wLjAzMjE3Nzk5NTg5MDM3ODk1LC0wLjA2MTMzMTg2ODE3MTY5MTg5NSwtMC4wMzU2NDY3NDQwNzI0MzcyODYsLTAuMDc4NjQxMDI3MjEyMTQyOTQsMC4wNDU4MDYzNTIwNDkxMTIzMiwtMC4wMDMzNTU1MDQyNDY0Mjg2MDksMC4wMTg3OTE1MTE2NTQ4NTM4MiwtMC4wMjI1ODUyNzgzNzY5MzY5MTMsMC4wNDU1NDA2NjQzNDUwMjYwMTYsMC4...
783
smtplib SMTP protocol client Source code Lib smtplib py The smtplib module defines an SMTP client session object that can be used to send mail to any internet machine with an SMTP or ESMTP listener daemon For details of SMTP and ESMTP operation consult RFC 821 Simple Mail Transfer Protocol and RFC 1869 SMTP Service Ext...
en
"Wy0wLjA2Njg3NzA1MjE4NzkxOTYyLDAuMDMwNDA5ODU1NzY4MDg0NTI2LDAuMDAwNjM4MzE1OTc3OTk0MzUyNiwwLjAwODQ4ODQ4MDkzMzAxMDU3OCwwLjAzNjkxODg0ODc1Mjk3NTQ2NCwtMC4wNzI5NTUyMDYwMzY1Njc2OSwwLjAyMTI0OTU4Mjk5MTAwMzk5LDAuMDExOTEwMTQ1MTcwOTg2NjUyLDAuMDAzNTY1ODY1NTY4ODE2NjYyLC0wLjAyNjAzNjQ0MTMyNjE0MTM1NywtMC4wMTA3OTU5NDcxNjQyOTcxMDQsMC4wMjE...
784
must use an absolute path for host starting with a Authentication is supported using the regular SMTP mechanism When using a Unix socket LMTP generally don t support or require any authentication but your mileage might vary Changed in version 3 9 The optional timeout parameter was added A nice selection of exceptions i...
en
"Wy0wLjA0OTAzMTY0NTA1OTU4NTU3LDAuMDA0ODEwOTc5NTg5ODE5OTA4LDAuMDUyODYyNDY5MTA2OTEyNjEsMC4wMjQxMDg5MTQ2NTg0MjcyNCwwLjA0NDU1MzgwNTE0MjY0MTA3LC0wLjAxMDc3MDU3MTQxODEwNjU1NiwtMC4wMjM3MDY3Mzc5MDU3NDA3MzgsMC4wNDg1ODk2MjA3MzkyMjE1NywwLjA0NjE5NTA2Mzc0MDAxNTAzLC0wLjA0OTA1NTI4MjAyNjUyOTMxLDAuMDY4NDAxODUwNzU5OTgzMDYsMC4wMTgyNjg1MDg...
785
ration it should not be necessary to call this method explicitly It will be implicitly called by the sendmail when necessary SMTP ehlo name Identify yourself to an ESMTP server using EHLO The hostname argument defaults to the fully qualified domain name of the local host Examine the response for ESMTP option and store ...
en
"Wy0wLjA3NjE4NDM2OTYyMzY2MTA0LDAuMDIxMjIwNDU0OTQ2MTYwMzE2LDAuMDEwMzI1NzQ5NDA0NzI4NDEzLDAuMDMxMjM0OTA4ODQ5MDAwOTMsLTAuMDA5MTcyNDI3NDY4MDAxODQyLC0wLjA4MjYwNzA2ODEyMTQzMzI2LDAuMDYzNzE0MDEyNTAzNjIzOTYsMC4wMjY5MTg3NzgxOTU5NzcyMSwwLjA0MTA3MTMzMjk5MTEyMzIsLTAuMDIzNzMzMzE0MTI2NzI5OTY1LDAuMDQyNzYwNjU5MDA5MjE4MjE2LC0wLjA4NjcyNzQ...
786
respectively They all require that the user and password properties of the SMTP instance are set to appropriate values User code does not normally need to call auth directly but can instead call the login method which will try each of the above mechanisms in turn in the order listed auth is exposed to facilitate the im...
en
"Wy0wLjA2MDA2MDY3NjE4NzI3Njg0LDAuMDQwOTM2MzMyMTk1OTk3MjQsMC4wMjA4NDE4MTgzMDI4Njk3OTcsLTAuMDA3MjMwNjMxMDc1Nzk5NDY1LDAuMDA4OTI3NTU1NzU0NzgwNzcsLTAuMDQ2NzYwMDUyNDQyNTUwNjYsMC4wNDQyNzY0Mjc0Nzc1OTgxOSwtMC4wMTQzNDQwNDc3NTUwMDI5NzUsMC4wODAyMDkwMTY3OTk5MjY3NiwtMC4wNTA4NDQ2NjU2MTY3NTA3MiwwLjAyOTUzODkxMDgzNTk4MTM3LC0wLjAzMjc5OTM...
787
ter an exception is raised Changed in version 3 2 msg may be a byte string Changed in version 3 5 SMTPUTF8 support added and SMTPNotSupportedError may be raised if SMTPUTF8 is specified but the server does not support it SMTP send_message msg from_addr None to_addrs None mail_options rcpt_options This is a convenience ...
en
"Wy0wLjA0NzU3NzExNjYzODQyMjAxLC0wLjAwNDE3OTgwMTMyNjI0NTA2OTUsMC4wNDg5ODY1MDE5OTE3NDg4MSwwLjAzNDIxMzY3MzMyMzM5Mjg3LDAuMDc3NDc4NjA5OTc5MTUyNjgsLTAuMDMwNjg1ODEwMzcyMjMzMzksMC4wNDUzMjgwMjQ3NzQ3ODk4MSwwLjAzNTEyMTIzNTk5NjQ4NDc1NiwwLjA2MjI0MTg2MzQ1OTM0ODY4LDAuMDAzODcxNDUzMjI3NDc1Mjg1NSwwLjAwNDQ2Nzg2NTkxNzgzMTY1OSwtMC4wNzM1OTc...
788
zipapp Manage executable Python zip archives New in version 3 5 Source code Lib zipapp py This module provides tools to manage the creation of zip files containing Python code which can be executed directly by the Python interpreter The module provides both a Command Line Interface and a Python API Basic Example The fo...
en
"Wy0wLjExMjAwMjcyMjkxODk4NzI3LDAuMDY1MTk3MzMzNjkzNTA0MzMsLTAuMTE5NTA2NTUyODE1NDM3MzIsMC4wOTU3MTI5ODk1Njg3MTAzMywtMC4wMDM2MDQ1MjA4MTA3NjgwMDgyLC0wLjA4NTIyNDIwMzc2NTM5MjMsMC4wMTQ4NTY4NDYwNzE3Nzk3MjgsMC4wNzA2MjM2NTg1OTc0NjkzMywtMC4wNDE2ODI2MDQ3MDAzMjY5MiwwLjA1MjE4NzU2MTk4ODgzMDU2NiwwLjAwNTU5MjI4NzUxODA4NDA0OSwwLjA0MTY5MjU...
789
e target file will be set The main argument specifies the name of a callable which will be used as the main program for the archive It can only be specified if the source is a directory and the source does not already contain a __main__ py file The main argument should take the form pkg module callable and the archive ...
en
"Wy0wLjEwMDA2MTMxMjMxNzg0ODIsMC4wODkxODYwMjAxOTU0ODQxNiwtMC4wNjcyOTQ1NDU0NzE2NjgyNCwwLjA0MzM5OTIyMjE5NTE0ODQ3LDAuMDYzMDQ2Mzg4MzI4MDc1NDEsLTAuMDcwODUxMTkxODc4MzE4NzksMC4wMTcxNzE4ODM5NTU1OTc4NzgsMC4wNzY5ODI5MDA1MDAyOTc1NSwwLjAwNzMwNjQ1OTM1OTgyNDY1NzQsMC4wMDI2MTY3NTc3NTk4MjQzOTUsMC4wMDM0NjY1NTUxNTAyMjU3NTg2LDAuMDQxNjEyMjA...
790
version of Python installed on their system The key to doing this is to bundle all of the application s dependencies into the archive along with the application code The steps to create a standalone archive are as follows 1 Create your application in a directory as normal so you have a myapp directory containing a __ma...
en
"Wy0wLjAxNTg0MTA5NjYzOTYzMzE4LC0wLjAyOTEzNjM2NTI3OTU1NTMyLC0wLjAxMjQ3MjQzOTU1NzMxMzkxOSwtMC4wMTE4NDA1NDU1NzIzNDA0ODgsLTAuMDAwMTkxNTcxOTYyMjA0NzYxOCwtMC4wMzMwNTYyODg5NTc1OTU4MjUsMC4wMDY0MTY3NjE3ODIwMjAzMywwLjExMzMwNjgzNTI5Mzc2OTg0LC0wLjA2NzMyODkzNzM1MTcwMzY0LC0wLjAyMTA0NDcyOTI3NzQ5MTU3LC0wLjAxNjQxMzk3MzY0NDM3NTgsMC4wMTc...
791
importlib The implementation of import New in version 3 1 Source code Lib importlib __init__ py Introduction The purpose of the importlib package is three fold One is to provide the implementation of the import statement and thus by extension the __import__ function in Python source code This provides an implementation...
en
"Wy0wLjA5NjMyMDU2OTUxNTIyODI3LC0wLjA3ODM1NDY0MTc5NTE1ODM5LC0wLjA2NDEyMDM4OTUyMTEyMTk4LC0wLjAxNTM5NjkzMzA3MTMxNTI4OSwwLjA3MTgxNjc3MjIyMjUxODkyLC0wLjA1ODMwOTU2OTk1NDg3MjEzLDAuMDUzNTk2Mzc3MzcyNzQxNywwLjA2MzEyNzIyNzEyNzU1MjAzLC0wLjA0NTY1OTUzODM1ODQ0OTkzNiwtMC4wMTMwNDkxMjU2NzEzODY3MTksMC4wNjk0NjMyNTMwMjEyNDAyMywwLjAyODc4NzA...
792
in sys modules When reload is executed Python module s code is recompiled and the module level code re executed defining a new set of objects which are bound to names in the module s dictionary by reusing the loader which originally loaded the module The init function of extension modules is not called a second time As...
en
"Wy0wLjA3NDQxNzc5OTcxMTIyNzQyLC0wLjA1OTk3MDE3Mzk4NDc2NjAwNiwtMC4wNTExNzgzMzYxNDM0OTM2NSwwLjA0NTA1MjE0NDY3NjQ0NjkxNSwwLjAxMjA5OTQ5MTQzMjMwOTE1LC0wLjA4MTQwNzU2OTM0ODgxMjEsMC4wMTIyNjE3MDU0NzMwNjUzNzYsLTAuMDIwNTQ1NDUwOTcwNTMwNTEsLTAuMDE0NTQ2NDQwOTE0MjczMjYyLC0wLjA0MTk5NjAxMzM3MzEzNjUyLDAuMDY0NTczMjIwOTA4NjQxODIsMC4xMTk2NzE...
793
pec cannot be found None is returned When passed in target is a module object that the finder may use to make a more educated guess about what spec to return importlib util spec_from_loader may be useful for implementing concrete PathEntryFinders New in version 3 4 invalidate_caches An optional method which when called...
en
"Wy0wLjEwODgwNTQ0MDM2NjI2ODE2LC0wLjAzODg2NTEwNDMxNzY2NTEsLTAuMDk2MTMzMDAxMTQ4NzAwNzEsMC4wMzM1MDUzMzE3MjQ4ODIxMjYsMC4wMDgyMTg1ODQ1ODIyMDk1ODcsLTAuMDY2OTIxODMwMTc3MzA3MTMsMC4wMzkwODM0MTc1MDUwMjU4NjQsMC4wNDE4MTE5OTUyMDgyNjM0LC0wLjAxNDUyMzMzMTA3NTkwNjc1NCwtMC4wMjg4ODgzODU3NDI5MDI3NTYsMC4wMjI5MDg0OTk0NjQzOTI2NjIsLTAuMDE3NzI...
794
ccess to the data stored OSError is to be raised if the path cannot be found The path is expected to be constructed using a module s __file__ attribute or an item from a package s __path__ Changed in version 3 4 Raises OSError instead of NotImplementedError class importlib abc InspectLoader An abstract base class for a...
en
"Wy0wLjExOTk3NTA2NzY3NTExMzY4LDAuMDE3MDg5MjA4NTg4MDA0MTEyLC0wLjA2NDIyNTM4MzEwMjg5MzgzLDAuMDgwNjYwNzAwNzk4MDM0NjcsLTAuMDAyOTYyNTEzODI2Nzg3NDcxOCwtMC4wODA2NTMyMjA0MTUxMTUzNiwtMC4wMzAzMDc0NTEyNjMwNzAxMDcsMC4wOTAxMDg2ODUxOTU0NDYwMSwtMC4wNjc0MjU3NDI3NDUzOTk0OCwtMC4wNDM3MzkwOTkwNTU1Mjg2NCwwLjA0OTE5NjIzNTgzNTU1MjIxNiwtMC4wMjI...
795
allow for sourceless loading where only bytecode is provided Bytecode files are an optimization to speed up loading by removing the parsing step of Python s compiler and so no bytecode specific API is exposed path_stats path Optional abstract method which returns a dict containing metadata about the specified path Supp...
en
"Wy0wLjA5Nzc3OTg3MDAzMzI2NDE2LDAuMDI5NTc0MDkyNDc3NTYwMDQzLC0wLjAzMzc2NTg3MTA3Nzc3NTk1NSwwLjAzOTQ5NDM2OTE3OTAxMDM5LDAuMDAzMjk0NjExMzQ5NzAxODgxNCwtMC4xMDA0MTAzODY5MTk5NzUyOCwtMC4wNzY3NTYzMzU3OTQ5MjU2OSwwLjA1OTk4ODQ0NjUzMzY3OTk2LC0wLjA0NjUyNjI5NzkyNjkwMjc3LC0wLjAwNDQwNTA2MDc4MzAyODYwMywwLjAyMDEyMzQzNzA0NzAwNDcsMC4wMTMwNjk...
796
undError is raised if name does not exist abstractmethod contents Returns an iterable of strings over the contents of the package Do note that it is not required that all names returned by the iterator be actual resources e g it is acceptable to return names for which is_resource would be false Allowing non resource na...
en
"Wy0wLjEyMjM5MjY5OTEyMjQyODksMC4wNTA5MTk1NDc2NzcwNDAxLC0wLjA0MjQxNDg1MTQ4NjY4Mjg5LDAuMDQ3ODcxODIwNjI4NjQzMDM2LDAuMDMzNjk3NzIwNjE3MDU1ODksLTAuMTEyNzY0ODg3NTExNzMwMiwwLjA1MDMxOTQ5NjU0MjIxNTM1LDAuMDU3MDYwMDI5MzU3NjcxNzQsLTAuMDI0Nzg3ODU2MjY1OTAyNTIsLTAuMDY3MjQ2NDA3MjcwNDMxNTIsMC4wMjc4OTcxMDA4OTU2NDMyMzQsLTAuMDI2MzE0NTAwNzE...
797
the importlib abc MetaPathFinder and importlib abc InspectLoader ABCs Only class methods are defined by this class to alleviate the need for instantiation Changed in version 3 5 As part of PEP 489 the builtin importer now implements Loader create_module and Loader exec_module class importlib machinery FrozenImporter An...
en
"Wy0wLjA4MjQxNzQ4ODA5ODE0NDUzLC0wLjA2NTM0MjM3NDE0NTk4NDY1LC0wLjA4MDEzODc5NTA3NzgwMDc1LDAuMDIxODkwMjgyNjMwOTIwNDEsMC4wMzkyNjk2MDAwNjM1NjIzOSwtMC4wMzIzODI2NTIxNjM1MDU1NTQsMC4wMTI4Mzk5MjkyMDA3MDg4NjYsMC4wMjcxMzg0OTU4MTc3ODA0OTUsLTAuMDk1MzQ4ODQ5ODkyNjE2MjcsLTAuMDQxOTMzNzMzOTY5OTI2ODM0LDAuMDQ2NDExOTQ2NDE1OTAxMTg0LDAuMDM1OTU...
798
ry ImportError is raised class importlib machinery SourceFileLoader fullname path A concrete implementation of importlib abc SourceLoader by subclassing importlib abc FileLoader and providing some concrete implementations of other methods New in version 3 3 name The name of the module that this loader will handle path ...
en
"Wy0wLjE0NTk2NTc0MDA4NDY0ODEzLC0wLjA4MDk3NTc3MDk1MDMxNzM4LC0wLjA1NjIzNDkwNzM1ODg4NDgxLC0wLjAwMzAyOTI3ODI0NjY4NTg2MjUsMC4wMTI5MTMzNzE0MzYyOTc4OTQsLTAuMDY2MjQ5MzQ4MjIzMjA5MzgsLTAuMDA2NDY3MzYyODY1ODA1NjI2LDAuMDI5NDU1Njg0MTI1NDIzNDMsLTAuMDU0MDc4NjQ2MDA0MTk5OTgsLTAuMDQxOTM5MTcyODkzNzYyNTksMC4wMzM3Mjg5NjA5MDE0OTg3OTUsLTAuMDA...
799
rsion 3 4 name __name__ The module s fully qualified name The finder should always set this attribute to a non empty string loader __loader__ The loader used to load the module The finder should always set this attribute origin __file__ The location the loader should use to load the module For example for modules loade...
en
"Wy0wLjA3Mzg1MjQyNzMwMzc5MTA1LC0wLjA0NTA1NzUzMTQ0NjIxODQ5LC0wLjA1OTE3NTc0MDkyNzQ1NzgxLDAuMDE4NjA3MTU4MjEzODUzODM2LDAuMDAyMDQxNzkwNDAxNTYzMDQ4NCwtMC4wMTY3MTAwNjcxNjc4NzgxNSwwLjA0NDI0MzM2NTUyNjE5OTM0LDAuMDU1MzI0ODU2MTkxODczNTUsLTAuMDI2MjcwNDQ5MTYxNTI5NTQsLTAuMDYwMDI1MDMyNjA5NzAxMTYsMC4wMjg3MDMyNzQyMDUzMjcwMzQsMC4wMDU3NzY...