id
int64
0
2.72k
content
stringlengths
5
4.1k
language
stringclasses
4 values
embedding
unknown
2,700
signal Set handlers for asynchronous events Source code Lib signal py This module provides mechanisms to use signal handlers in Python General rules The signal signal function allows defining custom handlers to be executed when a signal is received A small number of default handlers are installed SIGPIPE is ignored so ...
en
"Wy0wLjA2MzQ4ODc4MTQ1MjE3ODk2LC0wLjA1NjA5ODc1OTE3NDM0NjkyNCwwLjAxNjY3NTcyMzcxNjYxNjYzLDAuMDU2NjUzMzM5NDE1Nzg4NjUsLTAuMDM4OTgxMzExMDIzMjM1MzIsLTAuMDQ0NDY0MzkwNzI0ODk3Mzg1LC0wLjAyMDY5MzcxOTM4NzA1NDQ0MywwLjA0MTU5MjA1NDA2OTA0MjIwNiwtMC4wMTEwMTg2MzQ3NzM3OTA4MzYsLTAuMDU0NTM3NDQxNTgxNDg3NjU2LC0wLjAxNzgyNDk0NTk3MTM2OTc0MywwLjA...
2,701
exception For example division by zero See also ZeroDivisionError is raised when the second argument of a division or modulo operation is zero signal SIGHUP Hangup detected on controlling terminal or death of controlling process Availability Unix signal SIGILL Illegal instruction signal SIGINT Interrupt from keyboard ...
en
"Wy0wLjAzMTAzNTQxMzk2NTU4Mjg0OCwtMC4wNDkyNDg1MDkxMDkwMjAyMywtMC4wMzg4OTU4OTAxMTY2OTE1OSwtMC4wMTMyNzc2NDgwMTY4MTA0MTcsLTAuMDEzODgwNTAxNTAxMjYyMTg4LC0wLjAwNDc1NTI4NjQ5OTg1NzkwMjUsMC4wMTY3NDk1OTk5NDg1MjU0MywwLjExMzA0MDIwODgxNjUyODMyLDAuMDQwNzg0ODU4MTY3MTcxNDgsLTAuMDA4MDc3NTcyMDk5ODY0NDgzLDAuMDkyMjExMjMxNTg5MzE3MzIsLTAuMDA...
2,702
eviously ignored signal SIG_DFL means that the default way of handling the signal was previously in use and None means that the previous signal handler was not installed from Python signal strsignal signalnum Returns the description of signal signalnum such as Interrupt for SIGINT Returns None if signalnum has no descr...
en
"Wy0wLjA2MzE2ODA0MTQwODA2MTk4LC0wLjA5OTIxMzUwMzMwMTE0MzY1LC0wLjAyMjU3NDg2ODA1MzE5Nzg2LC0wLjAwMjM3OTk3OTcwNTQzODAxOCwtMC4wMTM0NTE5ODMyMjA4NzUyNjMsLTAuMDM1ODQzNTYyMzM0Nzc1OTI1LDAuMDI3MzI4OTI3MDY5OTAyNDIsMC4wMzk1NDQ1MDQxMzU4NDcwOSwwLjAxNzMwNTUzMDYwNzcwMDM0OCwtMC4wNDU2MjI2OTUyMzczOTgxNSwwLjAzMDgxMTQ4MzA0MDQ1MjAwMywwLjAwMDM...
2,703
which Availability Unix signal set_wakeup_fd fd warn_on_full_buffer True Set the wakeup file descriptor to fd When a signal is received the signal number is written as a single byte into the fd This can be used by a library to wakeup a poll or select call allowing the signal to be fully processed The old wakeup fd is r...
en
"Wy0wLjAzMzQ4NDE0MjI3MzY2NDQ3NCwwLjAyMzgzMDY4NzYyNzE5NjMxMiwtMC4wNTY0NTU5OTk2MTI4MDgyMywtMC4wMDg1MDMyMzEyMTk5NDczMzgsMC4wNjI4NTA1MzQ5MTU5MjQwNywwLjAwMTQ4MTI5NzU0MjM0MTA1MzUsMC4wMjgxMTk0MDM4Njg5MTM2NSwwLjA3MjE1NTE5OTk0NDk3Mjk5LDAuMDk2ODgwOTcyMzg1NDA2NSwwLjAwNDI0NDc4NTI5MDIxMTQzOSwtMC4wNDIwNzgzNjgzNjU3NjQ2MiwwLjAyOTk5NTA...
2,704
rther information See also pause pthread_sigmask sigpending sigwaitinfo and sigtimedwait New in version 3 3 signal sigwaitinfo sigset Suspend execution of the calling thread until the delivery of one of the signals specified in the signal set sigset The function accepts the signal and removes it from the pending list o...
en
"Wy0wLjA1MzMwMTg3NDU0ODE5Njc5LC0wLjAzMjMwMTQyMjIwODU0NzU5LDAuMDAzNTkxMTUwMjc4MjI1NTQxLDAuMDM1NTQwNzY3MDE0MDI2NjQsMC4wMjM2MDMxODYwMTEzMTQzOTIsLTAuMDA5MDY1MTU1ODcxMjEyNDgyLDAuMDgxOTMzNTY1NDM3NzkzNzMsMC4wMzI5MjE1NzUwMDk4MjI4NDUsMC4wNjYwNTA0MDI4MjAxMTAzMiwtMC4wMTQzODU0MjY0MTY5OTMxNDEsMC4wNjE4MTI5MDM3MzIwNjEzODYsMC4wMDI3ODc...
2,705
thing is fine self lock acquire If KeyboardInterrupt occurs here __exit__ will not be called KeyboardInterrupt could occur just before the function returns def __exit__ self exc_type exc_val exc_tb self lock release For many programs especially those that merely want to exit on KeyboardInterrupt this is not a problem b...
en
"Wy0wLjA1NDI1NzU0MTg5NDkxMjcyLC0wLjA5NTI3OTYzMzk5ODg3MDg1LC0wLjAxOTg0OTY2MTczNzY4MDQzNSwtMC4wMzQ3Nzc3NjA1MDU2NzYyNywtMC4wNzk0Nzk3OTg2NzQ1ODM0NCwtMC4wMTI0NTE0NTQ5OTcwNjI2ODMsMC4wMjg4ODQxNDQ0OTk4OTc5NTcsLTAuMDAwMzg5MTg2Njk0NTE5NTk0MywwLjAxOTMyMDc5NzE3NTE2ODk5LDAuMDI3NDk4OTYwNDk0OTk1MTE3LDAuMDU1MzY4MjE4NTcwOTQ3NjUsMC4wMzU...
2,706
email headerregistry Custom Header Objects Source code Lib email headerregistry py New in version 3 6 1 Headers are represented by customized subclasses of str The particular class used to represent a given header is determined by the header_factory of the policy in effect when the headers are created This section docu...
en
"Wy0wLjExNjU1NTQxNTA5Mzg5ODc3LDAuMDYzNzcwMTIyODI2MDk5NCwtMC4wMDcyNzk2OTM2MTQ2OTE0OTYsLTAuMDIzMDI0Mzg5NTIwMjg3NTE0LDAuMDYwMTYwNDU4MDg3OTIxMTQsLTAuMDA2MzczNzA0ODc2NzUwNzA4LDAuMDQxMjU5NDg2MjI4MjI3NjE1LDAuMDUzMzQ5NzMzMzUyNjYxMTMsLTAuMDQ0MjkzMTIwNTAzNDI1NiwtMC4wMjk1NDg0MzgyNjU5MTk2ODUsLTAuMDQ2NDkwMzE1MzQ3OTA5OTMsLTAuMDMwODM...
2,707
emoved and handled and the remaining contents of kw and args passed to the BaseHeader init method class email headerregistry UnstructuredHeader An unstructured header is the default type of header in RFC 5322 Any header that does not have a specified syntax is treated as unstructured The classic example of an unstructu...
en
"Wy0wLjA1MzI5MDE1MTA1OTYyNzUzLDAuMDg0NTU1MjM4NDg1MzM2MywwLjA0ODI5NTE4MTI0NDYxMTc0LDAuMDA3NjY3MjY3Njk1MDY5MzEzLDAuMDI0NzA4NTI4MDcxNjQxOTIyLC0wLjAxNzE3MTY2Nzg4ODc2MDU2NywtMC4wMTYyNzEyNjMzNjA5NzcxNzMsLTAuMDA4MDUzMjAwMzE5NDA5MzcsMC4wNDY5MjQzODI0NDgxOTY0MSwtMC4wMjc5MzE4MDc1NjI3MDg4NTUsLTAuMDUwMDY3NTI1MzU3MDA3OTgsLTAuMDc3NTY...
2,708
he default policy accessing this attribute will result in a ValueError Many of the above classes also have a Unique variant for example UniqueUnstructuredHeader The only difference is that in the Unique variant max_count is set to 1 class email headerregistry MIMEVersionHeader There is really only one valid value for t...
en
"Wy0wLjA2NTAwMjQyNjUwNTA4ODgsMC4wNTkyMDk4MzQ3ODQyNjkzMywwLjAxMjA0MTY2OTMzODk0MTU3NCwtMC4wMDk5NzMxNzU4MjM2ODg1MDcsMC4wODc4NzcwNTc0OTI3MzMsMC4wMzc5MzQ5NTUyMDk0OTM2NCwwLjA4Mjg4MTg3NTMzNjE3MDIsMC4wMjA5MTY1NjI1Mjc0MTgxMzcsLTAuMDM3NTc2ODIwNzAxMzYwNywtMC4wMjk3NDYzOTA4NzkxNTQyMDUsLTAuMDE0MTIwMjMyMzEzODcxMzg0LC0wLjAzNzQ1NzE2MDY...
2,709
e domain or username domain where each part must conform to specific syntax rules spelled out in RFC 5322 As a convenience addr_spec can be specified instead of username and domain in which case username and domain will be parsed from the addr_spec An addr_spec must be a properly RFC quoted string if it is not Address ...
en
"Wy0wLjA5OTg4MzU1NjM2NTk2NjgsLTAuMDAwNzE2MTY4ODk5MDg5MDk4LDAuMDIyMjQxNjM4OTczMzU1MjkzLC0wLjAzNjkwOTI4MjIwNzQ4OTAxNCwtMC4wMjkxMjEyNzU5OTEyMDE0LC0wLjA3NzIwMzI1ODg3MjAzMjE3LDAuMDM2ODgxMTM3NjM5Mjg0MTM0LC0wLjAwODE2MzgxMzUwMTU5NjQ1LDAuMDc0NDQyMjE1MjYzODQzNTQsLTAuMDcyNTE0Mjg4MTI3NDIyMzMsMC4wMjg0MDcwMTMwNDM3NjEyNTMsLTAuMDczNzc...
2,710
html entities Definitions of HTML general entities Source code Lib html entities py This module defines four dictionaries html5 name2codepoint codepoint2name and entitydefs html entities html5 A dictionary that maps HTML5 named character references 1 to the equivalent Unicode character s e g html5 gt Note that the trai...
en
"Wy0wLjA0MTA5MTg4NTQxNzY5OTgxNCwtMC4xMDUyMzU4ODk1NTQwMjM3NCwtMC4wMDk1NTE2Njg1Mzk2NDMyODgsLTAuMDIyMjU0NjA2NzA4ODg0MjQsLTAuMDA2MzEyNjY1NTI5NTQ5MTIyLC0wLjA0NjEzNTUzMzYwMTA0NTYxLC0wLjAxNzY3ODQ0MzM0MjQ0NzI4LC0wLjA4Mjk4MDAyMTgzNDM3MzQ3LDAuMDUxOTg2NTI2Njk3ODc0MDcsLTAuMDA1NDI4MDE1MjU0NDM3OTIzLDAuMDY0NzU2NTU3MzQ1MzkwMzIsLTAuMDY...
2,711
Enum HOWTO An Enum is a set of symbolic names bound to unique values They are similar to global variables but they offer a more useful repr grouping type safety and a few other features They are most useful when you have a variable that can take one of a limited selection of values For example the days of the week from...
en
"Wy0wLjA0NjM0ODU0MTk3NTAyMTM2LC0wLjAyNzQyNTQ1MzA2NjgyNTg2NywtMC4wMTE2NTQxMzI5NzcxMjgwMjksLTAuMDI4NDM3MjY0MjYzNjI5OTEzLC0wLjAxMTExNDk5NDA2Mzk3MzQyNywwLjAwNTU5ODczMDg3MzMxNjUyNiwwLjA1MTA2ODg4MzM4OTIzNDU0LC0wLjAyNzg1MTMzNTcwNDMyNjYzLC0wLjA3ODQ5MjE2NDYxMTgxNjQsLTAuMDM1NjU1NzE4Mjk2NzY2MjgsMC4wMzE2MjM2NDI4OTE2NDU0MywtMC4wNjY...
2,712
won t do because the exact color is not known at program writing time Enum allows such access Color 1 Color RED 1 Color 3 Color BLUE 3 If you want to access enum members by name use item access Color RED Color RED 1 Color GREEN Color GREEN 2 If you have an enum member and need its name or value member Color RED member...
en
"WzAuMDA2MzczOTE2NzUyNjM2NDMzLC0wLjAyMDIwNjQ4NjgwNjI3MzQ2LC0wLjAzMjgwMDQ3Njk5ODA5MDc0NCwtMC4wMjM1Mjk0MTIyMjQ4ODg4LC0wLjA1ODk0NzY3ODY1NTM4NTk3LC0wLjAxODY4ODU4MTg4MzkwNzMxOCwwLjA3MjcxMDcwMDMzMzExODQ0LC0wLjA0MDE2ODEyNTE4MjM5MDIxLC0wLjA0MDM4ODgwMzkyOTA5MDUsLTAuMDI1MTA2ODQ5MTQ4ODY5NTE0LDAuMDI2NTgyNDE5ODcyMjgzOTM2LC0wLjA2MzQ...
2,713
and provided by default by the Functional API but not strictly enforced In the vast majority of use cases one doesn t care what the actual value of an enumeration is But if the value is important enumerations can have arbitrary values Enumerations are Python classes and can have methods and special methods as usual If...
en
"Wy0wLjA0MjE2ODQ2MDc4NjM0MjYyLDAuMDA4MTMzMDI0OTA4NjAyMjM4LC0wLjA3ODQwNDk0MDY2NDc2ODIyLC0wLjAwMjgzNTUwNTE3NjMzNTU3MywtMC4wNzY2OTUyNDg0ODQ2MTE1MSwtMC4wMDEwNjUxMTg4MjA0MDY0OTY1LDAuMDgxOTUyNTY0NDE4MzE1ODksMC4wMTY2ODkxNjQ1NjQwMTM0OCwtMC4wMTUzODc3MjEzNTk3Mjk3NjcsLTAuMDQ5MzA2MDA4OTY0Nzc2OTksMC4wMzM1MzIwNTY5NTc0ODMyOSwtMC4wMzg...
2,714
of names to values The last two options enable assigning arbitrary values to enumerations the others auto assign increasing integers starting with 1 use the start parameter to specify a different starting value A new class derived from Enum is returned In other words the above assignment to Animal is equivalent to clas...
en
"Wy0wLjAyODQ3Njg1NDc4NjI3NjgxNywtMC4wNDE0MzY1OTAyNTQzMDY3OSwtMC4wNzc5NzU2NjgwMTMwOTU4NiwwLjA0MTYxNzg4MTUwNjY4MTQ0LC0wLjA1MDMxMjc5NDc0NDk2ODQxNCwwLjAwODU0MTM1NzcwMzUwNjk0NywwLjA3OTM2NDM4MTczMDU1NjQ5LC0wLjAwMTgzNjQwMDU5NTQ5MzYxNDcsLTAuMDQ3MDIxODM5NzY3Njk0NDcsLTAuMDU0NDA1NTkyMzgxOTU0MTksMC4wNDcxODMyNjQwNDY5MDc0MjUsLTAuMTA...
2,715
en IntFlag and Enum is that if no flags are set the value is 0 its boolean evaluation is False Perm R Perm X Perm 0 bool Perm R Perm X False Because IntFlag members are also subclasses of int they can be combined with them but may lose IntFlag membership Perm X 4 Perm R X 5 Perm X 8 9 Note The negation operator always ...
en
"WzAuMDQ4MDQ0ODM0Mjg1OTc0NSwtMC4wMTYwODg5MDQ4MTI5MzIwMTQsLTAuMDc3Mzk4MDQ2ODUxMTU4MTQsLTAuMDQzMTU4ODQ0MTEzMzQ5OTE1LDAuMDI0NjQzODcwMDcwNTc2NjY4LC0wLjAyMDE1NDMzNjQ2NzM4NTI5MiwwLjA5NjMwNTQ4OTU0MDEwMDEsLTAuMDAxNjA1ODc2ODM3ODU3MDY3NiwtMC4wNjQ0Mjg3MDk0NDczODM4OCwtMC4wMTc2NDUzNjgzNTI1MzIzODcsMC4wNDUzMjIxNDI1NDE0MDg1NCwtMC4wOTY...
2,716
Do not call super __new__ as the lookup only __new__ is the one that is found instead use the data type directly Finer Points Supported __dunder__ names __members__ is a read only ordered mapping of member_name member items It is only available on the class __new__ if specified must create and return the enum members ...
en
"Wy0wLjA5MDMzMTI2Mzg0MDE5ODUyLC0wLjAxNTg0NzY2OTkxNDM2NDgxNSwtMC4wMDk2ODYwNjM5NzUwOTU3NDksLTAuMDYyNjQwMzMxNjg1NTQzMDYsLTAuMDUyODQ5NjQ2NjU3NzA1MzEsLTAuMDYzNjAxOTExMDY3OTYyNjUsLTAuMDA3NjgwOTY2MDUzMTU4MDQ1LC0wLjAxMzE1NTQ0MjY2MjUzNzA5OCwtMC4wNTk3ODU1MzM2OTY0MTMwNCwtMC4wMDA1NjY0MDM0OTc5NDE3OTIsMC4wNjMyOTU4MzM3NjY0NjA0MiwtMC4...
2,717
new flag flag set with the corresponding positive integer value Color BLUE Color BLUE 4 Color BLUE Color RED GREEN 3 names of pseudo flags are constructed from their members names Color RED Color GREEN name RED GREEN multi bit flags aka aliases can be returned from operations Color RED Color BLUE Color PURPLE 5 Color ...
en
"WzAuMDEwNjA3MDA5NzUzNTg0ODYyLDAuMDQ1MjMxMjMwNTU2OTY0ODc0LC0wLjEwMjg1MTc3MDgxODIzMzQ5LC0wLjAzMjM5NzI3NzY1MzIxNzMxNiwtMC4wMDE3NjgwMzkwNzM3OTUwODAyLC0wLjAyNjE2MDQyNjQzNzg1NDc2NywwLjA4NzAxMDk2NDc1MTI0MzU5LC0wLjAzOTI0Njk2MTQ3NDQxODY0LC0wLjAzNDczNjA1NTg4MDc4NDk5LDAuMDA0NTM0NzI2NDk2Nzg1ODc5LC0wLjAyMjg1NTI4MzY5MjQ3OTEzNCwtMC4...
2,718
or GREEN Using a descriptive string Using a string as the value would look like class Color Enum RED stop GREEN go BLUE too fast Color GREEN Color GREEN go Using a custom __new__ Using an auto numbering __new__ would look like class AutoNumber Enum def __new__ cls value len cls __members__ 1 obj object __new__ cls obj ...
en
"Wy0wLjA0MTM2ODY3MDc2MTU4NTIzNiwtMC4wMDg4ODcyMjU3NjIwMDk2MiwtMC4wNDA0NjEwODk0NjIwNDE4NTUsLTAuMDY0ODAwMDk4NTM4Mzk4NzQsLTAuMDU2OTQzMjc1MDM0NDI3NjQsMC4wNjQ0MDk2ODgxMTUxMTk5MywwLjExOTE3ODA3MTYxODA4MDE0LDAuMDM0MzIxNzI1MzY4NDk5NzU2LC0wLjA5MjQ5NzA5NTQ2NTY2MDEsLTAuMDMzNjM3NDkwMTIzNTEwMzYsMC4wMDQxODgxNjk3MjUyMzkyNzcsLTAuMDUzOTE...
2,719
Exceptions Source code Lib asyncio exceptions py exception asyncio TimeoutError A deprecated alias of TimeoutError raised when the operation has exceeded the given deadline Changed in version 3 11 This class was made an alias of TimeoutError exception asyncio CancelledError The operation has been cancelled This excepti...
en
"Wy0wLjA4MDM3NTAzODA4NzM2ODAxLDAuMDM4MzQ2MjU3MDYwNzY2MjIsLTAuMDMzMDExNjU5OTc5ODIwMjUsMC4wNTY5Njk0NjM4MjUyMjU4MywtMC4wMjI2MDI3MzMyMjQ2MzAzNTYsLTAuMDg5MDk5NTg2MDA5OTc5MjUsLTAuMDY2MzU5ODE3OTgxNzE5OTcsMC4wNjMxMTAxNTc4NDc0MDQ0OCwtMC4wMjA4MzMyOTI5NzYwMjE3NjcsMC4wMDIzNTkxMjgzMjQzMTQ5NTIsLTAuMDA3MDQ5MTg1MjIzODc3NDMsLTAuMDE1MDA...
2,720
Set Objects This section details the public API for set and frozenset objects Any functionality not listed below is best accessed using either the abstract object protocol including PyObject_CallMethod PyObject_RichCompareBool PyObject_Hash PyObject_Repr PyObject_IsTrue PyObject_Print and PyObject_GetIter or the abstra...
en
"Wy0wLjA2NTM1MzI5NjY5NzEzOTc0LDAuMDEyNzI4ODU3ODA3ODE1MDc1LC0wLjExNzc4MjA2Mzc4MjIxNTEyLDAuMDI1NjI5NjgwNjAzNzQyNiwtMC4wNjUxNDE4ODY0NzI3MDIwMywtMC4wMjQ4NDUxMjUxNTM2NjA3NzQsLTAuMDI2NzgwMDU5NTYxMTMzMzg1LDAuMDQyNjUxOTU1MDM4MzA5MSwtMC4wMzkxMzg3NTY2OTI0MDk1MTUsLTAuMDA4NzEzNDA0NjQ4MDA1OTYyLC0wLjAxNjgxNjg2Mzc5MDE1NDQ1NywwLjA0NzM...
2,721
Error if set is not an instance of set or its subtype The following functions are available for instances of set or its subtypes but not for instances of frozenset or its subtypes int PySet_Discard PyObject set PyObject key Part of the Stable ABI Return 1 if found and removed 0 if not found no action taken and 1 if an ...
en
"Wy0wLjAyNDQyMDAzNDE0MDM0ODQzNCwtMC4wMTEyODEzNTk5NDA3NjcyODgsLTAuMDAzMDQ3NjU3ODk3Njk1ODk5LDAuMDIwNTgzNTgzMDQyMDI1NTY2LC0wLjAyMDU3MTE3NDEwMDA0MTM5LC0wLjA2MTI3MTQ0MDIzNzc2MDU0NCwwLjA3NTIxOTU0OTIzODY4MTgsLTAuMDA4ODgyODE3ODEyMjYzOTY2LC0wLjAwNjk3NzE1MDIxNjY5ODY0NjUsLTAuMDQwMjQxOTE5NDU3OTEyNDQ1LDAuMDExOTc5NjMyMDc5NjAxMjg4LC0...