decimal.Decimal.number_class()

number_class(context=None) Return a string describing the class of the operand. The returned value is one of the following ten strings. "-Infinity", indicating that the operand is negative infinity. "-Normal", indicating that the operand is a negative normal number. "-Subnormal", indicating that the operand is negative and subnormal. "-Zero", indicating that the operand is a negative zero. "+Zero", indicating that the operand is a positive zero. "+Subnormal", indicating that the operan

email.message.EmailMessage.add_attachment()

add_attachment(*args, content_manager=None, **kw) If the message is a multipart/mixed, create a new message object, pass all of the arguments to its set_content() method, and attach() it to the multipart. If the message is a non-multipart, multipart/related, or multipart/alternative, call make_mixed() and then proceed as above. If content_manager is not specified, use the content_manager specified by the current policy. If the added part has no Content-Disposition header, add one with the va

BaseException.with_traceback()

with_traceback(tb) This method sets tb as the new traceback for the exception and returns the exception object. It is usually used in exception handling code like this: try: ... except SomeException: tb = sys.exc_info()[2] raise OtherException(...).with_traceback(tb)

quopri.encode()

quopri.encode(input, output, quotetabs, header=False) Encode the contents of the input file and write the resulting quoted- printable data to the output file. input and output must be binary file objects. quotetabs, a flag which controls whether to encode embedded spaces and tabs must be provideda and when true it encodes such embedded whitespace, and when false it leaves them unencoded. Note that spaces and tabs appearing at the end of lines are always encoded, as per RFC 1521. header is a

ValueError

exception ValueError Raised when a built-in operation or function receives an argument that has the right type but an inappropriate value, and the situation is not described by a more precise exception such as IndexError.

typing.re

class typing.re Wrapper namespace for regular expression matching types. This defines the type aliases Pattern and Match which correspond to the return types from re.compile() and re.match(). These types (and the corresponding functions) are generic in AnyStr and can be made specific by writing Pattern[str], Pattern[bytes], Match[str], or Match[bytes].

mailbox.MMDFMessage.set_from()

set_from(from_, time_=None) Set the “From ” line to from_, which should be specified without a leading “From ” or trailing newline. For convenience, time_ may be specified and will be formatted appropriately and appended to from_. If time_ is specified, it should be a time.struct_time instance, a tuple suitable for passing to time.strftime(), or True (to use time.gmtime()).

importlib.machinery.SourceFileLoader.path

path The path to the source file.

xml.dom.minidom.Node.toprettyxml()

Node.toprettyxml(indent="", newl="", encoding="") Return a pretty-printed version of the document. indent specifies the indentation string and defaults to a tabulator; newl specifies the string emitted at the end of each line and defaults to \n. The encoding argument behaves like the corresponding argument of toxml().

crypt.crypt()

crypt.crypt(word, salt=None) word will usually be a user’s password as typed at a prompt or in a graphical interface. The optional salt is either a string as returned from mksalt(), one of the crypt.METHOD_* values (though not all may be available on all platforms), or a full encrypted password including salt, as returned by this function. If salt is not provided, the strongest method will be used (as returned by methods(). Checking a password is usually done by passing the plain-text passwo