email.policy.EmailPolicy.header_fetch_parse()

header_fetch_parse(name, value) If the value has a name attribute, it is returned to unmodified. Otherwise the name, and the value with any CR or LF characters removed, are passed to the header_factory, and the resulting header object is returned. Any surrogateescaped bytes get turned into the unicode unknown-character glyph.

test.support.EnvironmentVarGuard

class test.support.EnvironmentVarGuard Class used to temporarily set or unset environment variables. Instances can be used as a context manager and have a complete dictionary interface for querying/modifying the underlying os.environ. After exit from the context manager all changes to environment variables done through this instance will be rolled back. Changed in version 3.1: Added dictionary interface.

datetime.datetime.utctimetuple()

datetime.utctimetuple() If datetime instance d is naive, this is the same as d.timetuple() except that tm_isdst is forced to 0 regardless of what d.dst() returns. DST is never in effect for a UTC time. If d is aware, d is normalized to UTC time, by subtracting d.utcoffset(), and a time.struct_time for the normalized time is returned. tm_isdst is forced to 0. Note that an OverflowError may be raised if d.year was MINYEAR or MAXYEAR and UTC adjustment spills over a year boundary.

email.message.Message.__getitem__()

__getitem__(name) Return the value of the named header field. name should not include the colon field separator. If the header is missing, None is returned; a KeyError is never raised. Note that if the named field appears more than once in the message’s headers, exactly which of those field values will be returned is undefined. Use the get_all() method to get the values of all the extant named headers.

ssl.SSLWantReadError

exception ssl.SSLWantReadError A subclass of SSLError raised by a non-blocking SSL socket when trying to read or write data, but more data needs to be received on the underlying TCP transport before the request can be fulfilled. New in version 3.3.

types.SimpleNamespace

class types.SimpleNamespace A simple object subclass that provides attribute access to its namespace, as well as a meaningful repr. Unlike object, with SimpleNamespace you can add and remove attributes. If a SimpleNamespace object is initialized with keyword arguments, those are directly added to the underlying namespace. The type is roughly equivalent to the following code: class SimpleNamespace: def __init__(self, **kwargs): self.__dict__.update(kwargs) def __repr__(self):

urllib.request.OpenerDirector.error()

OpenerDirector.error(proto, *args) Handle an error of the given protocol. This will call the registered error handlers for the given protocol with the given arguments (which are protocol specific). The HTTP protocol is a special case which uses the HTTP response code to determine the specific error handler; refer to the http_error_*() methods of the handler classes. Return values and exceptions raised are the same as those of urlopen().

ipaddress.IPv4Address.exploded

exploded The string representation in dotted decimal notation. Leading zeroes are never included in the representation. As IPv4 does not define a shorthand notation for addresses with octets set to zero, these two attributes are always the same as str(addr) for IPv4 addresses. Exposing these attributes makes it easier to write display code that can handle both IPv4 and IPv6 addresses.

sys.abiflags

sys.abiflags On POSIX systems where Python was built with the standard configure script, this contains the ABI flags as specified by PEP 3149. New in version 3.2.

ctypes.c_ulonglong

class ctypes.c_ulonglong Represents the C unsigned long long datatype. The constructor accepts an optional integer initializer; no overflow checking is done.