neulab/docprompting-conala huggingface dataset:
enumerate(iterable, start=0)  
Return an enumerate object. iterable must be a sequence, an iterator, or some other object which supports iteration. The __next__() method of the iterator returned by enumerate() returns a tuple containing a count (from start which defaults to 0) and the values obtained from iterating over iterable. >>> seasons = ['Spring', 'Summer', 'Fall', 'Winter']
>>> list(enumerate(seasons))
[(0, 'Spring'), (1, 'Summer'), (2, 'Fall'), (3, 'Winter')]
>>> list(enumerate(seasons, start=1))
[(1, 'Spring'), (2, 'Summer'), (3, 'Fall'), (4, 'Winter')]
 Equivalent to: def enumerate(sequence, start=0):
    n = start
    for elem in sequence:
        yield n, elem
        n += 1
exception EOFError  
Raised when the input() function hits an end-of-file condition (EOF) without reading any data. (N.B.: the io.IOBase.read() and io.IOBase.readline() methods return an empty string when they hit EOF.)
eval(expression[, globals[, locals]])  
The arguments are a string and optional globals and locals. If provided, globals must be a dictionary. If provided, locals can be any mapping object. The expression argument is parsed and evaluated as a Python expression (technically speaking, a condition list) using the globals and locals dictionaries as global and local namespace. If the globals dictionary is present and does not contain a value for the key __builtins__, a reference to the dictionary of the built-in module builtins is inserted under that key before expression is parsed. This means that expression normally has full access to the standard builtins module and restricted environments are propagated. If the locals dictionary is omitted it defaults to the globals dictionary. If both dictionaries are omitted, the expression is executed with the globals and locals in the environment where eval() is called. Note, eval() does not have access to the nested scopes (non-locals) in the enclosing environment. The return value is the result of the evaluated expression. Syntax errors are reported as exceptions. Example: >>> x = 1
>>> eval('x+1')
2
 This function can also be used to execute arbitrary code objects (such as those created by compile()). In this case pass a code object instead of a string. If the code object has been compiled with 'exec' as the mode argument, eval()’s return value will be None. Hints: dynamic execution of statements is supported by the exec() function. The globals() and locals() functions returns the current global and local dictionary, respectively, which may be useful to pass around for use by eval() or exec(). See ast.literal_eval() for a function that can safely evaluate strings with expressions containing only literals.
Raises an auditing event exec with the code object as the argument. Code compilation events may also be raised.
exception Exception  
All built-in, non-system-exiting exceptions are derived from this class. All user-defined exceptions should also be derived from this class.
Exceptions Source code: Lib/asyncio/exceptions.py  
exception asyncio.TimeoutError  
The operation has exceeded the given deadline.  Important This exception is different from the builtin TimeoutError exception.  
  
exception asyncio.CancelledError  
The operation has been cancelled. This exception can be caught to perform custom operations when asyncio Tasks are cancelled. In almost all situations the exception must be re-raised.  Changed in version 3.8: CancelledError is now a subclass of BaseException.  
  
exception asyncio.InvalidStateError  
Invalid internal state of Task or Future. Can be raised in situations like setting a result value for a Future object that already has a result value set. 
  
exception asyncio.SendfileNotAvailableError  
The “sendfile” syscall is not available for the given socket or file type. A subclass of RuntimeError. 
  
exception asyncio.IncompleteReadError  
The requested read operation did not complete fully. Raised by the asyncio stream APIs. This exception is a subclass of EOFError.  
expected  
The total number (int) of expected bytes. 
  
partial  
A string of bytes read before the end of stream was reached. 
 
  
exception asyncio.LimitOverrunError  
Reached the buffer size limit while looking for a separator. Raised by the asyncio stream APIs.  
consumed  
The total number of to be consumed bytes.
exec(object[, globals[, locals]])  
This function supports dynamic execution of Python code. object must be either a string or a code object. If it is a string, the string is parsed as a suite of Python statements which is then executed (unless a syntax error occurs). 1 If it is a code object, it is simply executed. In all cases, the code that’s executed is expected to be valid as file input (see the section “File input” in the Reference Manual). Be aware that the nonlocal, yield, and return statements may not be used outside of function definitions even within the context of code passed to the exec() function. The return value is None. In all cases, if the optional parts are omitted, the code is executed in the current scope. If only globals is provided, it must be a dictionary (and not a subclass of dictionary), which will be used for both the global and the local variables. If globals and locals are given, they are used for the global and local variables, respectively. If provided, locals can be any mapping object. Remember that at module level, globals and locals are the same dictionary. If exec gets two separate objects as globals and locals, the code will be executed as if it were embedded in a class definition. If the globals dictionary does not contain a value for the key __builtins__, a reference to the dictionary of the built-in module builtins is inserted under that key. That way you can control what builtins are available to the executed code by inserting your own __builtins__ dictionary into globals before passing it to exec().
Raises an auditing event exec with the code object as the argument. Code compilation events may also be raised.  Note The built-in functions globals() and locals() return the current global and local dictionary, respectively, which may be useful to pass around for use as the second and third argument to exec().   Note The default locals act as described for function locals() below: modifications to the default locals dictionary should not be attempted. Pass an explicit locals dictionary if you need to see effects of the code on locals after function exec() returns.
quit(code=None)  
exit(code=None)  
Objects that when printed, print a message like “Use quit() or Ctrl-D (i.e. EOF) to exit”, and when called, raise SystemExit with the specified exit code.
False  
The false value of the bool type. Assignments to False are illegal and raise a SyntaxError.
faulthandler.cancel_dump_traceback_later()  
Cancel the last call to dump_traceback_later().
faulthandler.disable()  
Disable the fault handler: uninstall the signal handlers installed by enable().
faulthandler.dump_traceback(file=sys.stderr, all_threads=True)  
Dump the tracebacks of all threads into file. If all_threads is False, dump only the current thread.  Changed in version 3.5: Added support for passing file descriptor to this function.
faulthandler.dump_traceback_later(timeout, repeat=False, file=sys.stderr, exit=False)  
Dump the tracebacks of all threads, after a timeout of timeout seconds, or every timeout seconds if repeat is True. If exit is True, call _exit() with status=1 after dumping the tracebacks. (Note _exit() exits the process immediately, which means it doesn’t do any cleanup like flushing file buffers.) If the function is called twice, the new call replaces previous parameters and resets the timeout. The timer has a sub-second resolution. The file must be kept open until the traceback is dumped or cancel_dump_traceback_later() is called: see issue with file descriptors. This function is implemented using a watchdog thread.  Changed in version 3.7: This function is now always available.   Changed in version 3.5: Added support for passing file descriptor to this function.
faulthandler.enable(file=sys.stderr, all_threads=True)  
Enable the fault handler: install handlers for the SIGSEGV, SIGFPE, SIGABRT, SIGBUS and SIGILL signals to dump the Python traceback. If all_threads is True, produce tracebacks for every running thread. Otherwise, dump only the current thread. The file must be kept open until the fault handler is disabled: see issue with file descriptors.  Changed in version 3.5: Added support for passing file descriptor to this function.   Changed in version 3.6: On Windows, a handler for Windows exception is also installed.
faulthandler.register(signum, file=sys.stderr, all_threads=True, chain=False)  
Register a user signal: install a handler for the signum signal to dump the traceback of all threads, or of the current thread if all_threads is False, into file. Call the previous handler if chain is True. The file must be kept open until the signal is unregistered by unregister(): see issue with file descriptors. Not available on Windows.  Changed in version 3.5: Added support for passing file descriptor to this function.
faulthandler.unregister(signum)  
Unregister a user signal: uninstall the handler of the signum signal installed by register(). Return True if the signal was registered, False otherwise. Not available on Windows.
fcntl.fcntl(fd, cmd, arg=0)  
Perform the operation cmd on file descriptor fd (file objects providing a fileno() method are accepted as well). The values used for cmd are operating system dependent, and are available as constants in the fcntl module, using the same names as used in the relevant C header files. The argument arg can either be an integer value, or a bytes object. With an integer value, the return value of this function is the integer return value of the C fcntl() call. When the argument is bytes it represents a binary structure, e.g. created by struct.pack(). The binary data is copied to a buffer whose address is passed to the C fcntl() call. The return value after a successful call is the contents of the buffer, converted to a bytes object. The length of the returned object will be the same as the length of the arg argument. This is limited to 1024 bytes. If the information returned in the buffer by the operating system is larger than 1024 bytes, this is most likely to result in a segmentation violation or a more subtle data corruption. If the fcntl() fails, an OSError is raised. Raises an auditing event fcntl.fcntl with arguments fd, cmd, arg.
fcntl.flock(fd, operation)  
Perform the lock operation operation on file descriptor fd (file objects providing a fileno() method are accepted as well). See the Unix manual flock(2) for details. (On some systems, this function is emulated using fcntl().) If the flock() fails, an OSError exception is raised. Raises an auditing event fcntl.flock with arguments fd, operation.
fcntl.ioctl(fd, request, arg=0, mutate_flag=True)  
This function is identical to the fcntl() function, except that the argument handling is even more complicated. The request parameter is limited to values that can fit in 32-bits. Additional constants of interest for use as the request argument can be found in the termios module, under the same names as used in the relevant C header files. The parameter arg can be one of an integer, an object supporting the read-only buffer interface (like bytes) or an object supporting the read-write buffer interface (like bytearray). In all but the last case, behaviour is as for the fcntl() function. If a mutable buffer is passed, then the behaviour is determined by the value of the mutate_flag parameter. If it is false, the buffer’s mutability is ignored and behaviour is as for a read-only buffer, except that the 1024 byte limit mentioned above is avoided – so long as the buffer you pass is at least as long as what the operating system wants to put there, things should work. If mutate_flag is true (the default), then the buffer is (in effect) passed to the underlying ioctl() system call, the latter’s return code is passed back to the calling Python, and the buffer’s new contents reflect the action of the ioctl(). This is a slight simplification, because if the supplied buffer is less than 1024 bytes long it is first copied into a static buffer 1024 bytes long which is then passed to ioctl() and copied back into the supplied buffer. If the ioctl() fails, an OSError exception is raised. An example: >>> import array, fcntl, struct, termios, os
>>> os.getpgrp()
13341
>>> struct.unpack('h', fcntl.ioctl(0, termios.TIOCGPGRP, "  "))[0]
13341
>>> buf = array.array('h', [0])
>>> fcntl.ioctl(0, termios.TIOCGPGRP, buf, 1)
0
>>> buf
array('h', [13341])
 Raises an auditing event fcntl.ioctl with arguments fd, request, arg.
fcntl.lockf(fd, cmd, len=0, start=0, whence=0)  
This is essentially a wrapper around the fcntl() locking calls. fd is the file descriptor (file objects providing a fileno() method are accepted as well) of the file to lock or unlock, and cmd is one of the following values:  
LOCK_UN – unlock 
LOCK_SH – acquire a shared lock 
LOCK_EX – acquire an exclusive lock  When cmd is LOCK_SH or LOCK_EX, it can also be bitwise ORed with LOCK_NB to avoid blocking on lock acquisition. If LOCK_NB is used and the lock cannot be acquired, an OSError will be raised and the exception will have an errno attribute set to EACCES or EAGAIN (depending on the operating system; for portability, check for both values). On at least some systems, LOCK_EX can only be used if the file descriptor refers to a file opened for writing. len is the number of bytes to lock, start is the byte offset at which the lock starts, relative to whence, and whence is as with io.IOBase.seek(), specifically:  
0 – relative to the start of the file (os.SEEK_SET) 
1 – relative to the current buffer position (os.SEEK_CUR) 
2 – relative to the end of the file (os.SEEK_END)  The default for start is 0, which means to start at the beginning of the file. The default for len is 0 which means to lock to the end of the file. The default for whence is also 0. Raises an auditing event fcntl.lockf with arguments fd, cmd, len, start, whence.
filecmp.clear_cache()  
Clear the filecmp cache. This may be useful if a file is compared so quickly after it is modified that it is within the mtime resolution of the underlying filesystem.  New in version 3.4.
filecmp.cmp(f1, f2, shallow=True)  
Compare the files named f1 and f2, returning True if they seem equal, False otherwise. If shallow is true, files with identical os.stat() signatures are taken to be equal. Otherwise, the contents of the files are compared. Note that no external programs are called from this function, giving it portability and efficiency. This function uses a cache for past comparisons and the results, with cache entries invalidated if the os.stat() information for the file changes. The entire cache may be cleared using clear_cache().
filecmp.cmpfiles(dir1, dir2, common, shallow=True)  
Compare the files in the two directories dir1 and dir2 whose names are given by common. Returns three lists of file names: match, mismatch, errors. match contains the list of files that match, mismatch contains the names of those that don’t, and errors lists the names of files which could not be compared. Files are listed in errors if they don’t exist in one of the directories, the user lacks permission to read them or if the comparison could not be done for some other reason. The shallow parameter has the same meaning and default value as for filecmp.cmp(). For example, cmpfiles('a', 'b', ['c', 'd/e']) will compare a/c with b/c and a/d/e with b/d/e. 'c' and 'd/e' will each be in one of the three returned lists.
filecmp.DEFAULT_IGNORES  
 New in version 3.4.  List of directories ignored by dircmp by default.
class filecmp.dircmp(a, b, ignore=None, hide=None)  
Construct a new directory comparison object, to compare the directories a and b. ignore is a list of names to ignore, and defaults to filecmp.DEFAULT_IGNORES. hide is a list of names to hide, and defaults to [os.curdir, os.pardir]. The dircmp class compares files by doing shallow comparisons as described for filecmp.cmp(). The dircmp class provides the following methods:  
report()  
Print (to sys.stdout) a comparison between a and b. 
  
report_partial_closure()  
Print a comparison between a and b and common immediate subdirectories. 
  
report_full_closure()  
Print a comparison between a and b and common subdirectories (recursively). 
 The dircmp class offers a number of interesting attributes that may be used to get various bits of information about the directory trees being compared. Note that via __getattr__() hooks, all attributes are computed lazily, so there is no speed penalty if only those attributes which are lightweight to compute are used.  
left  
The directory a. 
  
right  
The directory b. 
  
left_list  
Files and subdirectories in a, filtered by hide and ignore. 
  
right_list  
Files and subdirectories in b, filtered by hide and ignore. 
  
common  
Files and subdirectories in both a and b. 
  
left_only  
Files and subdirectories only in a. 
  
right_only  
Files and subdirectories only in b. 
  
common_dirs  
Subdirectories in both a and b. 
  
common_files  
Files in both a and b. 
  
common_funny  
Names in both a and b, such that the type differs between the directories, or names for which os.stat() reports an error. 
  
same_files  
Files which are identical in both a and b, using the class’s file comparison operator. 
  
diff_files  
Files which are in both a and b, whose contents differ according to the class’s file comparison operator. 
  
funny_files  
Files which are in both a and b, but could not be compared. 
  
subdirs  
A dictionary mapping names in common_dirs to dircmp objects.
common_funny  
Names in both a and b, such that the type differs between the directories, or names for which os.stat() reports an error.
diff_files  
Files which are in both a and b, whose contents differ according to the class’s file comparison operator.
report_full_closure()  
Print a comparison between a and b and common subdirectories (recursively).
report_partial_closure()  
Print a comparison between a and b and common immediate subdirectories.
same_files  
Files which are identical in both a and b, using the class’s file comparison operator.
exception FileExistsError  
Raised when trying to create a file or directory which already exists. Corresponds to errno EEXIST.
class fileinput.FileInput(files=None, inplace=False, backup='', *, mode='r', openhook=None)  
Class FileInput is the implementation; its methods filename(), fileno(), lineno(), filelineno(), isfirstline(), isstdin(), nextfile() and close() correspond to the functions of the same name in the module. In addition it has a readline() method which returns the next input line, and a __getitem__() method which implements the sequence behavior. The sequence must be accessed in strictly sequential order; random access and readline() cannot be mixed. With mode you can specify which file mode will be passed to open(). It must be one of 'r', 'rU', 'U' and 'rb'. The openhook, when given, must be a function that takes two arguments, filename and mode, and returns an accordingly opened file-like object. You cannot use inplace and openhook together. A FileInput instance can be used as a context manager in the with statement. In this example, input is closed after the with statement is exited, even if an exception occurs: with FileInput(files=('spam.txt', 'eggs.txt')) as input:
    process(input)
  Changed in version 3.2: Can be used as a context manager.   Deprecated since version 3.4: The 'rU' and 'U' modes.   Deprecated since version 3.8: Support for __getitem__() method is deprecated.   Changed in version 3.8: The keyword parameter mode and openhook are now keyword-only.
fileinput.filelineno()  
Return the line number in the current file. Before the first line has been read, returns 0. After the last line of the last file has been read, returns the line number of that line within the file.
fileinput.filename()  
Return the name of the file currently being read. Before the first line has been read, returns None.
fileinput.fileno()  
Return the integer “file descriptor” for the current file. When no file is opened (before the first line and between files), returns -1.
fileinput.hook_compressed(filename, mode)  
Transparently opens files compressed with gzip and bzip2 (recognized by the extensions '.gz' and '.bz2') using the gzip and bz2 modules. If the filename extension is not '.gz' or '.bz2', the file is opened normally (ie, using open() without any decompression). Usage example: fi = fileinput.FileInput(openhook=fileinput.hook_compressed)
fileinput.hook_encoded(encoding, errors=None)  
Returns a hook which opens each file with open(), using the given encoding and errors to read the file. Usage example: fi =
fileinput.FileInput(openhook=fileinput.hook_encoded("utf-8",
"surrogateescape"))  Changed in version 3.6: Added the optional errors parameter.
fileinput.input(files=None, inplace=False, backup='', *, mode='r', openhook=None)  
Create an instance of the FileInput class. The instance will be used as global state for the functions of this module, and is also returned to use during iteration. The parameters to this function will be passed along to the constructor of the FileInput class. The FileInput instance can be used as a context manager in the with statement. In this example, input is closed after the with statement is exited, even if an exception occurs: with fileinput.input(files=('spam.txt', 'eggs.txt')) as f:
    for line in f:
        process(line)
  Changed in version 3.2: Can be used as a context manager.   Changed in version 3.8: The keyword parameters mode and openhook are now keyword-only.
fileinput.isfirstline()  
Return True if the line just read is the first line of its file, otherwise return False.
fileinput.isstdin()  
Return True if the last line was read from sys.stdin, otherwise return False.
fileinput.lineno()  
Return the cumulative line number of the line that has just been read. Before the first line has been read, returns 0. After the last line of the last file has been read, returns the line number of that line.
fileinput.nextfile()  
Close the current file so that the next iteration will read the first line from the next file (if any); lines not read from the file will not count towards the cumulative line count. The filename is not changed until after the first line of the next file has been read. Before the first line has been read, this function has no effect; it cannot be used to skip the first file. After the last line of the last file has been read, this function has no effect.
exception FileNotFoundError  
Raised when a file or directory is requested but doesn’t exist. Corresponds to errno ENOENT.
filter(function, iterable)  
Construct an iterator from those elements of iterable for which function returns true. iterable may be either a sequence, a container which supports iteration, or an iterator. If function is None, the identity function is assumed, that is, all elements of iterable that are false are removed. Note that filter(function, iterable) is equivalent to the generator expression (item for item in iterable if function(item)) if function is not None and (item for item in iterable if item) if function is None. See itertools.filterfalse() for the complementary function that returns elements of iterable for which function returns false.