logging.handlers.SocketHandler.createSocket()

createSocket() Tries to create a socket; on failure, uses an exponential back-off algorithm. On initial failure, the handler will drop the message it was trying to send. When subsequent messages are handled by the same instance, it will not try connecting until some time has passed. The default parameters are such that the initial delay is one second, and if after that delay the connection still can’t be made, the handler will double the delay each time up to a maximum of 30 seconds. This be

audioop.findfit()

audioop.findfit(fragment, reference) Try to match reference as well as possible to a portion of fragment (which should be the longer fragment). This is (conceptually) done by taking slices out of fragment, using findfactor() to compute the best match, and minimizing the result. The fragments should both contain 2-byte samples. Return a tuple (offset, factor) where offset is the (integer) offset into fragment where the optimal match started and factor is the (floating-point) factor as per fin

io.IOBase.seekable()

seekable() Return True if the stream supports random access. If False, seek(), tell() and truncate() will raise OSError.

smtplib.SMTP.has_extn()

SMTP.has_extn(name) Return True if name is in the set of SMTP service extensions returned by the server, False otherwise. Case is ignored.

ctypes.c_char_p

class ctypes.c_char_p Represents the C char * datatype when it points to a zero-terminated string. For a general character pointer that may also point to binary data, POINTER(c_char) must be used. The constructor accepts an integer address, or a bytes object.

tokenize.TokenError

exception tokenize.TokenError Raised when either a docstring or expression that may be split over several lines is not completed anywhere in the file, for example: """Beginning of docstring or: [1, 2, 3

winreg.PyHKEY.__exit__()

PyHKEY.__exit__(*exc_info) The HKEY object implements __enter__() and __exit__() and thus supports the context protocol for the with statement: with OpenKey(HKEY_LOCAL_MACHINE, "foo") as key: ... # work with key will automatically close key when control leaves the with block.

gettext.install()

gettext.install(domain, localedir=None, codeset=None, names=None) This installs the function _() in Python’s builtins namespace, based on domain, localedir, and codeset which are passed to the function translation(). For the names parameter, please see the description of the translation object’s install() method. As seen below, you usually mark the strings in your application that are candidates for translation, by wrapping them in a call to the _() function, like this: print(_('This string

socket.socket.connect_ex()

socket.connect_ex(address) Like connect(address), but return an error indicator instead of raising an exception for errors returned by the C-level connect() call (other problems, such as “host not found,” can still raise exceptions). The error indicator is 0 if the operation succeeded, otherwise the value of the errno variable. This is useful to support, for example, asynchronous connects.

sys.gettrace()

sys.gettrace() Get the trace function as set by settrace(). CPython implementation detail: The gettrace() function is intended only for implementing debuggers, profilers, coverage tools and the like. Its behavior is part of the implementation platform, rather than part of the language definition, and thus may not be available in all Python implementations.