bz2.BZ2Compressor.flush()

flush() Finish the compression process. Returns the compressed data left in internal buffers. The compressor object may not be used after this method has been called.

OSError.strerror

strerror The corresponding error message, as provided by the operating system. It is formatted by the C functions perror() under POSIX, and FormatMessage() under Windows.

memoryview.format

format A string containing the format (in struct module style) for each element in the view. A memoryview can be created from exporters with arbitrary format strings, but some methods (e.g. tolist()) are restricted to native single element formats. Changed in version 3.3: format 'B' is now handled according to the struct module syntax. This means that memoryview(b'abc')[0] == b'abc'[0] == 97.

email.headerregistry.AddressHeader

class email.headerregistry.AddressHeader Address headers are one of the most complex structured header types. The AddressHeader class provides a generic interface to any address header. This header type provides the following additional attributes: groups A tuple of Group objects encoding the addresses and groups found in the header value. Addresses that are not part of a group are represented in this list as single-address Groups whose display_name is None. addresses A tuple of Add

pickle.dump()

pickle.dump(obj, file, protocol=None, *, fix_imports=True) Write a pickled representation of obj to the open file object file. This is equivalent to Pickler(file, protocol).dump(obj). The optional protocol argument, an integer, tells the pickler to use the given protocol; supported protocols are 0 to HIGHEST_PROTOCOL. If not specified, the default is DEFAULT_PROTOCOL. If a negative number is specified, HIGHEST_PROTOCOL is selected. The file argument must have a write() method that accepts a

collections.somenamedtuple._replace()

somenamedtuple._replace(kwargs) Return a new instance of the named tuple replacing specified fields with new values: >>> p = Point(x=11, y=22) >>> p._replace(x=33) Point(x=33, y=22) >>> for partnum, record in inventory.items(): ... inventory[partnum] = record._replace(price=newprices[partnum], timestamp=time.now())

TimeoutError

exception TimeoutError Raised when a system function timed out at the system level. Corresponds to errno ETIMEDOUT.

types.prepare_class()

types.prepare_class(name, bases=(), kwds=None) Calculates the appropriate metaclass and creates the class namespace. The arguments are the components that make up a class definition header: the class name, the base classes (in order) and the keyword arguments (such as metaclass). The return value is a 3-tuple: metaclass, namespace, kwds metaclass is the appropriate metaclass, namespace is the prepared class namespace and kwds is an updated copy of the passed in kwds argument with any 'metacl

unittest.mock.Mock.mock_calls

mock_calls mock_calls records all calls to the mock object, its methods, magic methods and return value mocks. >>> mock = MagicMock() >>> result = mock(1, 2, 3) >>> mock.first(a=3) <MagicMock name='mock.first()' id='...'> >>> mock.second() <MagicMock name='mock.second()' id='...'> >>> int(mock) 1 >>> result(1) <MagicMock name='mock()()' id='...'> >>> expected = [call(1, 2, 3), call.first(a=3), call.second(), ...

os.sched_getparam()

os.sched_getparam(pid) Return the scheduling parameters as a sched_param instance for the process with PID pid. A pid of 0 means the calling process.