itertools.cycle()

itertools.cycle(iterable) Make an iterator returning elements from the iterable and saving a copy of each. When the iterable is exhausted, return elements from the saved copy. Repeats indefinitely. Roughly equivalent to: def cycle(iterable): # cycle('ABCD') --> A B C D A B C D A B C D ... saved = [] for element in iterable: yield element saved.append(element) while saved: for element in saved: yield element Note, this member of the to

http.cookiejar.CookiePolicy.domain_return_ok()

CookiePolicy.domain_return_ok(domain, request) Return false if cookies should not be returned, given cookie domain. This method is an optimization. It removes the need for checking every cookie with a particular domain (which might involve reading many files). Returning true from domain_return_ok() and path_return_ok() leaves all the work to return_ok(). If domain_return_ok() returns true for the cookie domain, path_return_ok() is called for the cookie path. Otherwise, path_return_ok() and r

string.Formatter.format_field()

format_field(value, format_spec) format_field() simply calls the global format() built-in. The method is provided so that subclasses can override it.

shlex.shlex

class shlex.shlex(instream=None, infile=None, posix=False) A shlex instance or subclass instance is a lexical analyzer object. The initialization argument, if present, specifies where to read characters from. It must be a file-/stream-like object with read() and readline() methods, or a string. If no argument is given, input will be taken from sys.stdin. The second optional argument is a filename string, which sets the initial value of the infile attribute. If the instream argument is omitte

unittest.TestResult.startTest()

startTest(test) Called when the test case test is about to be run.

parser.sequence2st()

parser.sequence2st(sequence) This function accepts a parse tree represented as a sequence and builds an internal representation if possible. If it can validate that the tree conforms to the Python grammar and all nodes are valid node types in the host version of Python, an ST object is created from the internal representation and returned to the called. If there is a problem creating the internal representation, or if the tree cannot be validated, a ParserError exception is raised. An ST obj

asyncio.asyncio.subprocess.Process.stdin

stdin Standard input stream (StreamWriter), None if the process was created with stdin=None.

threading.main_thread()

threading.main_thread() Return the main Thread object. In normal conditions, the main thread is the thread from which the Python interpreter was started. New in version 3.4.

asyncio.AbstractEventLoop.connect_read_pipe()

coroutine AbstractEventLoop.connect_read_pipe(protocol_factory, pipe) Register read pipe in eventloop. protocol_factory should instantiate object with Protocol interface. pipe is a file-like object. Return pair (transport, protocol), where transport supports the ReadTransport interface. With SelectorEventLoop event loop, the pipe is set to non-blocking mode. This method is a coroutine.

os.chdir()

os.chdir(path) Change the current working directory to path. This function can support specifying a file descriptor. The descriptor must refer to an opened directory, not an open file. New in version 3.3: Added support for specifying path as a file descriptor on some platforms.