neulab/docprompting-conala huggingface dataset:
subprocess.STDOUT  
Special value that can be used as the stderr argument to Popen and indicates that standard error should go into the same handle as standard output.
subprocess.STD_ERROR_HANDLE  
The standard error device. Initially, this is the active console screen buffer, CONOUT$.
subprocess.STD_INPUT_HANDLE  
The standard input device. Initially, this is the console input buffer, CONIN$.
subprocess.STD_OUTPUT_HANDLE  
The standard output device. Initially, this is the active console screen buffer, CONOUT$.
exception subprocess.SubprocessError  
Base class for all other exceptions from this module.  New in version 3.3.
exception subprocess.TimeoutExpired  
Subclass of SubprocessError, raised when a timeout expires while waiting for a child process.  
cmd  
Command that was used to spawn the child process. 
  
timeout  
Timeout in seconds. 
  
output  
Output of the child process if it was captured by run() or check_output(). Otherwise, None. 
  
stdout  
Alias for output, for symmetry with stderr. 
  
stderr  
Stderr output of the child process if it was captured by run(). Otherwise, None. 
  New in version 3.3.   Changed in version 3.5: stdout and stderr attributes added
sum(iterable, /, start=0)  
Sums start and the items of an iterable from left to right and returns the total. The iterable’s items are normally numbers, and the start value is not allowed to be a string. For some use cases, there are good alternatives to sum(). The preferred, fast way to concatenate a sequence of strings is by calling ''.join(sequence). To add floating point values with extended precision, see math.fsum(). To concatenate a series of iterables, consider using itertools.chain().  Changed in version 3.8: The start parameter can be specified as a keyword argument.
super([type[, object-or-type]])  
Return a proxy object that delegates method calls to a parent or sibling class of type. This is useful for accessing inherited methods that have been overridden in a class. The object-or-type determines the method resolution order to be searched. The search starts from the class right after the type. For example, if __mro__ of object-or-type is D -> B -> C -> A -> object and the value of type is B, then super() searches C -> A -> object. The __mro__ attribute of the object-or-type lists the method resolution search order used by both getattr() and super(). The attribute is dynamic and can change whenever the inheritance hierarchy is updated. If the second argument is omitted, the super object returned is unbound. If the second argument is an object, isinstance(obj, type) must be true. If the second argument is a type, issubclass(type2, type) must be true (this is useful for classmethods). There are two typical use cases for super. In a class hierarchy with single inheritance, super can be used to refer to parent classes without naming them explicitly, thus making the code more maintainable. This use closely parallels the use of super in other programming languages. The second use case is to support cooperative multiple inheritance in a dynamic execution environment. This use case is unique to Python and is not found in statically compiled languages or languages that only support single inheritance. This makes it possible to implement “diamond diagrams” where multiple base classes implement the same method. Good design dictates that such implementations have the same calling signature in every case (because the order of calls is determined at runtime, because that order adapts to changes in the class hierarchy, and because that order can include sibling classes that are unknown prior to runtime). For both use cases, a typical superclass call looks like this: class C(B):
    def method(self, arg):
        super().method(arg)    # This does the same thing as:
                               # super(C, self).method(arg)
 In addition to method lookups, super() also works for attribute lookups. One possible use case for this is calling descriptors in a parent or sibling class. Note that super() is implemented as part of the binding process for explicit dotted attribute lookups such as super().__getitem__(name). It does so by implementing its own __getattribute__() method for searching classes in a predictable order that supports cooperative multiple inheritance. Accordingly, super() is undefined for implicit lookups using statements or operators such as super()[name]. Also note that, aside from the zero argument form, super() is not limited to use inside methods. The two argument form specifies the arguments exactly and makes the appropriate references. The zero argument form only works inside a class definition, as the compiler fills in the necessary details to correctly retrieve the class being defined, as well as accessing the current instance for ordinary methods. For practical suggestions on how to design cooperative classes using super(), see guide to using super().
symbol — Constants used with Python parse trees Source code: Lib/symbol.py This module provides constants which represent the numeric values of internal nodes of the parse tree. Unlike most Python constants, these use lower-case names. Refer to the file Grammar/Grammar in the Python distribution for the definitions of the names in the context of the language grammar. The specific numeric values which the names map to may change between Python versions.  Warning The symbol module is deprecated and will be removed in future versions of Python.  This module also provides one additional data object:  
symbol.sym_name  
Dictionary mapping the numeric values of the constants defined in this module back to name strings, allowing more human-readable representation of parse trees to be generated.
symbol.sym_name  
Dictionary mapping the numeric values of the constants defined in this module back to name strings, allowing more human-readable representation of parse trees to be generated.
class symtable.Class  
A namespace of a class. This class inherits SymbolTable.  
get_methods()  
Return a tuple containing the names of methods declared in the class.
class symtable.Function  
A namespace for a function or method. This class inherits SymbolTable.  
get_parameters()  
Return a tuple containing names of parameters to this function. 
  
get_locals()  
Return a tuple containing names of locals in this function. 
  
get_globals()  
Return a tuple containing names of globals in this function. 
  
get_nonlocals()  
Return a tuple containing names of nonlocals in this function. 
  
get_frees()  
Return a tuple containing names of free variables in this function.
get_nonlocals()  
Return a tuple containing names of nonlocals in this function.
class symtable.Symbol  
An entry in a SymbolTable corresponding to an identifier in the source. The constructor is not public.  
get_name()  
Return the symbol’s name. 
  
is_referenced()  
Return True if the symbol is used in its block. 
  
is_imported()  
Return True if the symbol is created from an import statement. 
  
is_parameter()  
Return True if the symbol is a parameter. 
  
is_global()  
Return True if the symbol is global. 
  
is_nonlocal()  
Return True if the symbol is nonlocal. 
  
is_declared_global()  
Return True if the symbol is declared global with a global statement. 
  
is_local()  
Return True if the symbol is local to its block. 
  
is_annotated()  
Return True if the symbol is annotated.  New in version 3.6.  
  
is_free()  
Return True if the symbol is referenced in its block, but not assigned to. 
  
is_assigned()  
Return True if the symbol is assigned to in its block. 
  
is_namespace()  
Return True if name binding introduces new namespace. If the name is used as the target of a function or class statement, this will be true. For example: >>> table = symtable.symtable("def some_func(): pass", "string", "exec")
>>> table.lookup("some_func").is_namespace()
True
 Note that a single name can be bound to multiple objects. If the result is True, the name may also be bound to other objects, like an int or list, that does not introduce a new namespace. 
  
get_namespaces()  
Return a list of namespaces bound to this name. 
  
get_namespace()  
Return the namespace bound to this name. If more than one namespace is bound, ValueError is raised.
get_namespace()  
Return the namespace bound to this name. If more than one namespace is bound, ValueError is raised.
is_annotated()  
Return True if the symbol is annotated.  New in version 3.6.
is_declared_global()  
Return True if the symbol is declared global with a global statement.
is_free()  
Return True if the symbol is referenced in its block, but not assigned to.
is_namespace()  
Return True if name binding introduces new namespace. If the name is used as the target of a function or class statement, this will be true. For example: >>> table = symtable.symtable("def some_func(): pass", "string", "exec")
>>> table.lookup("some_func").is_namespace()
True
 Note that a single name can be bound to multiple objects. If the result is True, the name may also be bound to other objects, like an int or list, that does not introduce a new namespace.
class symtable.SymbolTable  
A namespace table for a block. The constructor is not public.  
get_type()  
Return the type of the symbol table. Possible values are 'class', 'module', and 'function'. 
  
get_id()  
Return the table’s identifier. 
  
get_name()  
Return the table’s name. This is the name of the class if the table is for a class, the name of the function if the table is for a function, or 'top' if the table is global (get_type() returns 'module'). 
  
get_lineno()  
Return the number of the first line in the block this table represents. 
  
is_optimized()  
Return True if the locals in this table can be optimized. 
  
is_nested()  
Return True if the block is a nested class or function. 
  
has_children()  
Return True if the block has nested namespaces within it. These can be obtained with get_children(). 
  
get_identifiers()  
Return a list of names of symbols in this table. 
  
lookup(name)  
Lookup name in the table and return a Symbol instance. 
  
get_symbols()  
Return a list of Symbol instances for names in the table. 
  
get_children()  
Return a list of the nested symbol tables.
get_lineno()  
Return the number of the first line in the block this table represents.
get_name()  
Return the table’s name. This is the name of the class if the table is for a class, the name of the function if the table is for a function, or 'top' if the table is global (get_type() returns 'module').
get_type()  
Return the type of the symbol table. Possible values are 'class', 'module', and 'function'.
has_children()  
Return True if the block has nested namespaces within it. These can be obtained with get_children().
symtable.symtable(code, filename, compile_type)  
Return the toplevel SymbolTable for the Python source code. filename is the name of the file containing the code. compile_type is like the mode argument to compile().
exception SyntaxError  
Raised when the parser encounters a syntax error. This may occur in an import statement, in a call to the built-in functions exec() or eval(), or when reading the initial script or standard input (also interactively). The str() of the exception instance returns only the error message.  
filename  
The name of the file the syntax error occurred in. 
  
lineno  
Which line number in the file the error occurred in. This is 1-indexed: the first line in the file has a lineno of 1. 
  
offset  
The column in the line where the error occurred. This is 1-indexed: the first character in the line has an offset of 1. 
  
text  
The source code text involved in the error.
lineno  
Which line number in the file the error occurred in. This is 1-indexed: the first line in the file has a lineno of 1.
offset  
The column in the line where the error occurred. This is 1-indexed: the first character in the line has an offset of 1.
sys.abiflags  
On POSIX systems where Python was built with the standard configure script, this contains the ABI flags as specified by PEP 3149.  Changed in version 3.8: Default flags became an empty string (m flag for pymalloc has been removed).   New in version 3.2.
sys.addaudithook(hook)  
Append the callable hook to the list of active auditing hooks for the current (sub)interpreter. When an auditing event is raised through the sys.audit() function, each hook will be called in the order it was added with the event name and the tuple of arguments. Native hooks added by PySys_AddAuditHook() are called first, followed by hooks added in the current (sub)interpreter. Hooks can then log the event, raise an exception to abort the operation, or terminate the process entirely.
Calling sys.addaudithook() will itself raise an auditing event named sys.addaudithook with no arguments. If any existing hooks raise an exception derived from RuntimeError, the new hook will not be added and the exception suppressed. As a result, callers cannot assume that their hook has been added unless they control all existing hooks. See the audit events table for all events raised by CPython, and PEP 578 for the original design discussion.  New in version 3.8.   Changed in version 3.8.1: Exceptions derived from Exception but not RuntimeError are no longer suppressed.   CPython implementation detail: When tracing is enabled (see settrace()), Python hooks are only traced if the callable has a __cantrace__ member that is set to a true value. Otherwise, trace functions will skip the hook.
sys.api_version  
The C API version for this interpreter. Programmers may find this useful when debugging version conflicts between Python and extension modules.
sys.argv  
The list of command line arguments passed to a Python script. argv[0] is the script name (it is operating system dependent whether this is a full pathname or not). If the command was executed using the -c command line option to the interpreter, argv[0] is set to the string '-c'. If no script name was passed to the Python interpreter, argv[0] is the empty string. To loop over the standard input, or the list of files given on the command line, see the fileinput module.  Note On Unix, command line arguments are passed by bytes from OS. Python decodes them with filesystem encoding and “surrogateescape” error handler. When you need original bytes, you can get it by [os.fsencode(arg) for arg in sys.argv].
sys.audit(event, *args)  
Raise an auditing event and trigger any active auditing hooks. event is a string identifying the event, and args may contain optional arguments with more information about the event. The number and types of arguments for a given event are considered a public and stable API and should not be modified between releases. For example, one auditing event is named os.chdir. This event has one argument called path that will contain the requested new working directory. sys.audit() will call the existing auditing hooks, passing the event name and arguments, and will re-raise the first exception from any hook. In general, if an exception is raised, it should not be handled and the process should be terminated as quickly as possible. This allows hook implementations to decide how to respond to particular events: they can merely log the event or abort the operation by raising an exception. Hooks are added using the sys.addaudithook() or PySys_AddAuditHook() functions. The native equivalent of this function is PySys_Audit(). Using the native function is preferred when possible. See the audit events table for all events raised by CPython.  New in version 3.8.
sys.base_exec_prefix  
Set during Python startup, before site.py is run, to the same value as exec_prefix. If not running in a virtual environment, the values will stay the same; if site.py finds that a virtual environment is in use, the values of prefix and exec_prefix will be changed to point to the virtual environment, whereas base_prefix and base_exec_prefix will remain pointing to the base Python installation (the one which the virtual environment was created from).  New in version 3.3.
sys.base_prefix  
Set during Python startup, before site.py is run, to the same value as prefix. If not running in a virtual environment, the values will stay the same; if site.py finds that a virtual environment is in use, the values of prefix and exec_prefix will be changed to point to the virtual environment, whereas base_prefix and base_exec_prefix will remain pointing to the base Python installation (the one which the virtual environment was created from).  New in version 3.3.
sys.breakpointhook()  
This hook function is called by built-in breakpoint(). By default, it drops you into the pdb debugger, but it can be set to any other function so that you can choose which debugger gets used. The signature of this function is dependent on what it calls. For example, the default binding (e.g. pdb.set_trace()) expects no arguments, but you might bind it to a function that expects additional arguments (positional and/or keyword). The built-in breakpoint() function passes its *args and **kws straight through. Whatever breakpointhooks() returns is returned from breakpoint(). The default implementation first consults the environment variable PYTHONBREAKPOINT. If that is set to "0" then this function returns immediately; i.e. it is a no-op. If the environment variable is not set, or is set to the empty string, pdb.set_trace() is called. Otherwise this variable should name a function to run, using Python’s dotted-import nomenclature, e.g. package.subpackage.module.function. In this case, package.subpackage.module would be imported and the resulting module must have a callable named function(). This is run, passing in *args and **kws, and whatever function() returns, sys.breakpointhook() returns to the built-in breakpoint() function. Note that if anything goes wrong while importing the callable named by PYTHONBREAKPOINT, a RuntimeWarning is reported and the breakpoint is ignored. Also note that if sys.breakpointhook() is overridden programmatically, PYTHONBREAKPOINT is not consulted.  New in version 3.7.
sys.builtin_module_names  
A tuple of strings giving the names of all modules that are compiled into this Python interpreter. (This information is not available in any other way — modules.keys() only lists the imported modules.)
sys.byteorder  
An indicator of the native byte order. This will have the value 'big' on big-endian (most-significant byte first) platforms, and 'little' on little-endian (least-significant byte first) platforms.
sys.call_tracing(func, args)  
Call func(*args), while tracing is enabled. The tracing state is saved, and restored afterwards. This is intended to be called from a debugger from a checkpoint, to recursively debug some other code.
sys.displayhook(value)  
If value is not None, this function prints repr(value) to sys.stdout, and saves value in builtins._. If repr(value) is not encodable to sys.stdout.encoding with sys.stdout.errors error handler (which is probably 'strict'), encode it to sys.stdout.encoding with 'backslashreplace' error handler. sys.displayhook is called on the result of evaluating an expression entered in an interactive Python session. The display of these values can be customized by assigning another one-argument function to sys.displayhook. Pseudo-code: def displayhook(value):
    if value is None:
        return
    # Set '_' to None to avoid recursion
    builtins._ = None
    text = repr(value)
    try:
        sys.stdout.write(text)
    except UnicodeEncodeError:
        bytes = text.encode(sys.stdout.encoding, 'backslashreplace')
        if hasattr(sys.stdout, 'buffer'):
            sys.stdout.buffer.write(bytes)
        else:
            text = bytes.decode(sys.stdout.encoding, 'strict')
            sys.stdout.write(text)
    sys.stdout.write("\n")
    builtins._ = value
  Changed in version 3.2: Use 'backslashreplace' error handler on UnicodeEncodeError.
sys.dllhandle  
Integer specifying the handle of the Python DLL. Availability: Windows.
sys.dont_write_bytecode  
If this is true, Python won’t try to write .pyc files on the import of source modules. This value is initially set to True or False depending on the -B command line option and the PYTHONDONTWRITEBYTECODE environment variable, but you can set it yourself to control bytecode file generation.
sys.excepthook(type, value, traceback)  
This function prints out a given traceback and exception to sys.stderr. When an exception is raised and uncaught, the interpreter calls sys.excepthook with three arguments, the exception class, exception instance, and a traceback object. In an interactive session this happens just before control is returned to the prompt; in a Python program this happens just before the program exits. The handling of such top-level exceptions can be customized by assigning another three-argument function to sys.excepthook.
Raise an auditing event sys.excepthook with arguments hook, type, value, traceback when an uncaught exception occurs. If no hook has been set, hook may be None. If any hook raises an exception derived from RuntimeError the call to the hook will be suppressed. Otherwise, the audit hook exception will be reported as unraisable and sys.excepthook will be called.  See also The sys.unraisablehook() function handles unraisable exceptions and the threading.excepthook() function handles exception raised by threading.Thread.run().
sys.exc_info()  
This function returns a tuple of three values that give information about the exception that is currently being handled. The information returned is specific both to the current thread and to the current stack frame. If the current stack frame is not handling an exception, the information is taken from the calling stack frame, or its caller, and so on until a stack frame is found that is handling an exception. Here, “handling an exception” is defined as “executing an except clause.” For any stack frame, only information about the exception being currently handled is accessible. If no exception is being handled anywhere on the stack, a tuple containing three None values is returned. Otherwise, the values returned are (type, value, traceback). Their meaning is: type gets the type of the exception being handled (a subclass of BaseException); value gets the exception instance (an instance of the exception type); traceback gets a traceback object which encapsulates the call stack at the point where the exception originally occurred.
sys.executable  
A string giving the absolute path of the executable binary for the Python interpreter, on systems where this makes sense. If Python is unable to retrieve the real path to its executable, sys.executable will be an empty string or None.
sys.exec_prefix  
A string giving the site-specific directory prefix where the platform-dependent Python files are installed; by default, this is also '/usr/local'. This can be set at build time with the --exec-prefix argument to the configure script. Specifically, all configuration files (e.g. the pyconfig.h header file) are installed in the directory exec_prefix/lib/pythonX.Y/config, and shared library modules are installed in exec_prefix/lib/pythonX.Y/lib-dynload, where X.Y is the version number of Python, for example 3.2.  Note If a virtual environment is in effect, this value will be changed in site.py to point to the virtual environment. The value for the Python installation will still be available, via base_exec_prefix.