neulab/docprompting-conala huggingface dataset:
NotImplemented  
Special value which should be returned by the binary special methods (e.g. __eq__(), __lt__(), __add__(), __rsub__(), etc.) to indicate that the operation is not implemented with respect to the other type; may be returned by the in-place binary special methods (e.g. __imul__(), __iand__(), etc.) for the same purpose. It should not be evaluated in a boolean context.  Note When a binary (or in-place) method returns NotImplemented the interpreter will try the reflected operation on the other type (or some other fallback, depending on the operator). If all attempts return NotImplemented, the interpreter will raise an appropriate exception. Incorrectly returning NotImplemented will result in a misleading error message or the NotImplemented value being returned to Python code. See Implementing the arithmetic operations for examples.   Note NotImplementedError and NotImplemented are not interchangeable, even though they have similar names and purposes. See NotImplementedError for details on when to use it.   Changed in version 3.9: Evaluating NotImplemented in a boolean context is deprecated. While it currently evaluates as true, it will emit a DeprecationWarning. It will raise a TypeError in a future version of Python.
exception NotImplementedError  
This exception is derived from RuntimeError. In user defined base classes, abstract methods should raise this exception when they require derived classes to override the method, or while the class is being developed to indicate that the real implementation still needs to be added.  Note It should not be used to indicate that an operator or method is not meant to be supported at all – in that case either leave the operator / method undefined or, if a subclass, set it to None.   Note NotImplementedError and NotImplemented are not interchangeable, even though they have similar names and purposes. See NotImplemented for details on when to use it.
class numbers.Complex  
Subclasses of this type describe complex numbers and include the operations that work on the built-in complex type. These are: conversions to complex and bool, real, imag, +, -, *, /, abs(), conjugate(), ==, and !=. All except - and != are abstract.  
real  
Abstract. Retrieves the real component of this number. 
  
imag  
Abstract. Retrieves the imaginary component of this number. 
  
abstractmethod conjugate()  
Abstract. Returns the complex conjugate. For example, (1+3j).conjugate()
== (1-3j).
abstractmethod conjugate()  
Abstract. Returns the complex conjugate. For example, (1+3j).conjugate()
== (1-3j).
class numbers.Integral  
Subtypes Rational and adds a conversion to int. Provides defaults for float(), numerator, and denominator. Adds abstract methods for ** and bit-string operations: <<, >>, &, ^, |, ~.
class numbers.Number  
The root of the numeric hierarchy. If you just want to check if an argument x is a number, without caring what kind, use isinstance(x, Number).
class numbers.Rational  
Subtypes Real and adds numerator and denominator properties, which should be in lowest terms. With these, it provides a default for float().  
numerator  
Abstract. 
  
denominator  
Abstract.
class numbers.Real  
To Complex, Real adds the operations that work on real numbers. In short, those are: a conversion to float, math.trunc(), round(), math.floor(), math.ceil(), divmod(), //, %, <, <=, >, and >=. Real also provides defaults for complex(), real, imag, and conjugate().
class object  
Return a new featureless object. object is a base for all classes. It has the methods that are common to all instances of Python classes. This function does not accept any arguments.  Note object does not have a __dict__, so you can’t assign arbitrary attributes to an instance of the object class.
object.__dict__  
A dictionary or other mapping object used to store an object’s (writable) attributes.
object.__getnewargs_ex__()  
In protocols 2 and newer, classes that implements the __getnewargs_ex__() method can dictate the values passed to the __new__() method upon unpickling. The method must return a pair (args, kwargs) where args is a tuple of positional arguments and kwargs a dictionary of named arguments for constructing the object. Those will be passed to the __new__() method upon unpickling. You should implement this method if the __new__() method of your class requires keyword-only arguments. Otherwise, it is recommended for compatibility to implement __getnewargs__().  Changed in version 3.6: __getnewargs_ex__() is now used in protocols 2 and 3.
object.__getnewargs__()  
This method serves a similar purpose as __getnewargs_ex__(), but supports only positional arguments. It must return a tuple of arguments args which will be passed to the __new__() method upon unpickling. __getnewargs__() will not be called if __getnewargs_ex__() is defined.  Changed in version 3.6: Before Python 3.6, __getnewargs__() was called instead of __getnewargs_ex__() in protocols 2 and 3.
object.__getstate__()  
Classes can further influence how their instances are pickled; if the class defines the method __getstate__(), it is called and the returned object is pickled as the contents for the instance, instead of the contents of the instance’s dictionary. If the __getstate__() method is absent, the instance’s __dict__ is pickled as usual.
object.__reduce_ex__(protocol)  
Alternatively, a __reduce_ex__() method may be defined. The only difference is this method should take a single integer argument, the protocol version. When defined, pickle will prefer it over the __reduce__() method. In addition, __reduce__() automatically becomes a synonym for the extended version. The main use for this method is to provide backwards-compatible reduce values for older Python releases.
object.__reduce__()  
The interface is currently defined as follows. The __reduce__() method takes no argument and shall return either a string or preferably a tuple (the returned object is often referred to as the “reduce value”). If a string is returned, the string should be interpreted as the name of a global variable. It should be the object’s local name relative to its module; the pickle module searches the module namespace to determine the object’s module. This behaviour is typically useful for singletons. When a tuple is returned, it must be between two and six items long. Optional items can either be omitted, or None can be provided as their value. The semantics of each item are in order:  A callable object that will be called to create the initial version of the object. A tuple of arguments for the callable object. An empty tuple must be given if the callable does not accept any argument. Optionally, the object’s state, which will be passed to the object’s __setstate__() method as previously described. If the object has no such method then, the value must be a dictionary and it will be added to the object’s __dict__ attribute. Optionally, an iterator (and not a sequence) yielding successive items. These items will be appended to the object either using obj.append(item) or, in batch, using obj.extend(list_of_items). This is primarily used for list subclasses, but may be used by other classes as long as they have append() and extend() methods with the appropriate signature. (Whether append() or extend() is used depends on which pickle protocol version is used as well as the number of items to append, so both must be supported.) Optionally, an iterator (not a sequence) yielding successive key-value pairs. These items will be stored to the object using obj[key] =
value. This is primarily used for dictionary subclasses, but may be used by other classes as long as they implement __setitem__(). 
Optionally, a callable with a (obj, state) signature. This callable allows the user to programmatically control the state-updating behavior of a specific object, instead of using obj’s static __setstate__() method. If not None, this callable will have priority over obj’s __setstate__().  New in version 3.8: The optional sixth tuple item, (obj, state), was added.
object.__setstate__(state)  
Upon unpickling, if the class defines __setstate__(), it is called with the unpickled state. In that case, there is no requirement for the state object to be a dictionary. Otherwise, the pickled state must be a dictionary and its items are assigned to the new instance’s dictionary.  Note If __getstate__() returns a false value, the __setstate__() method will not be called upon unpickling.
oct(x)  
Convert an integer number to an octal string prefixed with “0o”. The result is a valid Python expression. If x is not a Python int object, it has to define an __index__() method that returns an integer. For example: >>> oct(8)
'0o10'
>>> oct(-56)
'-0o70'
 If you want to convert an integer number to octal string either with prefix “0o” or not, you can use either of the following ways. >>> '%#o' % 10, '%o' % 10
('0o12', '12')
>>> format(10, '#o'), format(10, 'o')
('0o12', '12')
>>> f'{10:#o}', f'{10:o}'
('0o12', '12')
 See also format() for more information.
BaseHandler.<protocol>_open(req)  
This method is not defined in BaseHandler, but subclasses should define it if they want to handle URLs with the given protocol. This method, if defined, will be called by the parent OpenerDirector. Return values should be the same as for default_open().
operator.abs(obj)  
operator.__abs__(obj)  
Return the absolute value of obj.
operator.add(a, b)  
operator.__add__(a, b)  
Return a + b, for a and b numbers.
operator.and_(a, b)  
operator.__and__(a, b)  
Return the bitwise and of a and b.
operator.attrgetter(attr)  
operator.attrgetter(*attrs)  
Return a callable object that fetches attr from its operand. If more than one attribute is requested, returns a tuple of attributes. The attribute names can also contain dots. For example:  After f = attrgetter('name'), the call f(b) returns b.name. After f = attrgetter('name', 'date'), the call f(b) returns (b.name, b.date). After f = attrgetter('name.first', 'name.last'), the call f(b) returns (b.name.first, b.name.last).  Equivalent to: def attrgetter(*items):
    if any(not isinstance(item, str) for item in items):
        raise TypeError('attribute name must be a string')
    if len(items) == 1:
        attr = items[0]
        def g(obj):
            return resolve_attr(obj, attr)
    else:
        def g(obj):
            return tuple(resolve_attr(obj, attr) for attr in items)
    return g

def resolve_attr(obj, attr):
    for name in attr.split("."):
        obj = getattr(obj, name)
    return obj
operator.concat(a, b)  
operator.__concat__(a, b)  
Return a + b for a and b sequences.
operator.contains(a, b)  
operator.__contains__(a, b)  
Return the outcome of the test b in a. Note the reversed operands.
operator.countOf(a, b)  
Return the number of occurrences of b in a.
operator.delitem(a, b)  
operator.__delitem__(a, b)  
Remove the value of a at index b.
operator.lt(a, b)  
operator.le(a, b)  
operator.eq(a, b)  
operator.ne(a, b)  
operator.ge(a, b)  
operator.gt(a, b)  
operator.__lt__(a, b)  
operator.__le__(a, b)  
operator.__eq__(a, b)  
operator.__ne__(a, b)  
operator.__ge__(a, b)  
operator.__gt__(a, b)  
Perform “rich comparisons” between a and b. Specifically, lt(a, b) is equivalent to a < b, le(a, b) is equivalent to a <= b, eq(a,
b) is equivalent to a == b, ne(a, b) is equivalent to a != b, gt(a, b) is equivalent to a > b and ge(a, b) is equivalent to a
>= b. Note that these functions can return any value, which may or may not be interpretable as a Boolean value. See Comparisons for more information about rich comparisons.
operator.floordiv(a, b)  
operator.__floordiv__(a, b)  
Return a // b.
operator.getitem(a, b)  
operator.__getitem__(a, b)  
Return the value of a at index b.
operator.iadd(a, b)  
operator.__iadd__(a, b)  
a = iadd(a, b) is equivalent to a += b.
operator.iand(a, b)  
operator.__iand__(a, b)  
a = iand(a, b) is equivalent to a &= b.
operator.iconcat(a, b)  
operator.__iconcat__(a, b)  
a = iconcat(a, b) is equivalent to a += b for a and b sequences.
operator.ifloordiv(a, b)  
operator.__ifloordiv__(a, b)  
a = ifloordiv(a, b) is equivalent to a //= b.
operator.ilshift(a, b)  
operator.__ilshift__(a, b)  
a = ilshift(a, b) is equivalent to a <<= b.
operator.imatmul(a, b)  
operator.__imatmul__(a, b)  
a = imatmul(a, b) is equivalent to a @= b.  New in version 3.5.
operator.imod(a, b)  
operator.__imod__(a, b)  
a = imod(a, b) is equivalent to a %= b.
operator.imul(a, b)  
operator.__imul__(a, b)  
a = imul(a, b) is equivalent to a *= b.
operator.index(a)  
operator.__index__(a)  
Return a converted to an integer. Equivalent to a.__index__().
operator.indexOf(a, b)  
Return the index of the first of occurrence of b in a.
operator.inv(obj)  
operator.invert(obj)  
operator.__inv__(obj)  
operator.__invert__(obj)  
Return the bitwise inverse of the number obj. This is equivalent to ~obj.
operator.ior(a, b)  
operator.__ior__(a, b)  
a = ior(a, b) is equivalent to a |= b.
operator.ipow(a, b)  
operator.__ipow__(a, b)  
a = ipow(a, b) is equivalent to a **= b.
operator.irshift(a, b)  
operator.__irshift__(a, b)  
a = irshift(a, b) is equivalent to a >>= b.
operator.isub(a, b)  
operator.__isub__(a, b)  
a = isub(a, b) is equivalent to a -= b.
operator.is_not(a, b)  
Return a is not b. Tests object identity.
operator.itemgetter(item)  
operator.itemgetter(*items)  
Return a callable object that fetches item from its operand using the operand’s __getitem__() method. If multiple items are specified, returns a tuple of lookup values. For example:  After f = itemgetter(2), the call f(r) returns r[2]. After g = itemgetter(2, 5, 3), the call g(r) returns (r[2], r[5], r[3]).  Equivalent to: def itemgetter(*items):
    if len(items) == 1:
        item = items[0]
        def g(obj):
            return obj[item]
    else:
        def g(obj):
            return tuple(obj[item] for item in items)
    return g
 The items can be any type accepted by the operand’s __getitem__() method. Dictionaries accept any hashable value. Lists, tuples, and strings accept an index or a slice: >>> itemgetter(1)('ABCDEFG')
'B'
>>> itemgetter(1, 3, 5)('ABCDEFG')
('B', 'D', 'F')
>>> itemgetter(slice(2, None))('ABCDEFG')
'CDEFG'
>>> soldier = dict(rank='captain', name='dotterbart')
>>> itemgetter('rank')(soldier)
'captain'
 Example of using itemgetter() to retrieve specific fields from a tuple record: >>> inventory = [('apple', 3), ('banana', 2), ('pear', 5), ('orange', 1)]
>>> getcount = itemgetter(1)
>>> list(map(getcount, inventory))
[3, 2, 5, 1]
>>> sorted(inventory, key=getcount)
[('orange', 1), ('banana', 2), ('apple', 3), ('pear', 5)]
operator.itruediv(a, b)  
operator.__itruediv__(a, b)  
a = itruediv(a, b) is equivalent to a /= b.
operator.ixor(a, b)  
operator.__ixor__(a, b)  
a = ixor(a, b) is equivalent to a ^= b.
operator.length_hint(obj, default=0)  
Return an estimated length for the object o. First try to return its actual length, then an estimate using object.__length_hint__(), and finally return the default value.  New in version 3.4.
operator.lshift(a, b)  
operator.__lshift__(a, b)  
Return a shifted left by b.
operator.matmul(a, b)  
operator.__matmul__(a, b)  
Return a @ b.  New in version 3.5.
operator.methodcaller(name, /, *args, **kwargs)  
Return a callable object that calls the method name on its operand. If additional arguments and/or keyword arguments are given, they will be given to the method as well. For example:  After f = methodcaller('name'), the call f(b) returns b.name(). After f = methodcaller('name', 'foo', bar=1), the call f(b) returns b.name('foo', bar=1).  Equivalent to: def methodcaller(name, /, *args, **kwargs):
    def caller(obj):
        return getattr(obj, name)(*args, **kwargs)
    return caller
operator.mod(a, b)  
operator.__mod__(a, b)  
Return a % b.
operator.mul(a, b)  
operator.__mul__(a, b)  
Return a * b, for a and b numbers.
operator.neg(obj)  
operator.__neg__(obj)  
Return obj negated (-obj).
operator.not_(obj)  
operator.__not__(obj)  
Return the outcome of not obj. (Note that there is no __not__() method for object instances; only the interpreter core defines this operation. The result is affected by the __bool__() and __len__() methods.)
operator.or_(a, b)  
operator.__or__(a, b)  
Return the bitwise or of a and b.
operator.pos(obj)  
operator.__pos__(obj)  
Return obj positive (+obj).
operator.pow(a, b)  
operator.__pow__(a, b)  
Return a ** b, for a and b numbers.
operator.rshift(a, b)  
operator.__rshift__(a, b)  
Return a shifted right by b.
operator.setitem(a, b, c)  
operator.__setitem__(a, b, c)  
Set the value of a at index b to c.
operator.sub(a, b)  
operator.__sub__(a, b)  
Return a - b.
operator.truediv(a, b)  
operator.__truediv__(a, b)  
Return a / b where 2/3 is .66 rather than 0. This is also known as “true” division.
operator.truth(obj)  
Return True if obj is true, and False otherwise. This is equivalent to using the bool constructor.
operator.xor(a, b)  
operator.__xor__(a, b)  
Return the bitwise exclusive or of a and b.
ord(c)  
Given a string representing one Unicode character, return an integer representing the Unicode code point of that character. For example, ord('a') returns the integer 97 and ord('€') (Euro sign) returns 8364. This is the inverse of chr().
os.abort()  
Generate a SIGABRT signal to the current process. On Unix, the default behavior is to produce a core dump; on Windows, the process immediately returns an exit code of 3. Be aware that calling this function will not call the Python signal handler registered for SIGABRT with signal.signal().
os.access(path, mode, *, dir_fd=None, effective_ids=False, follow_symlinks=True)  
Use the real uid/gid to test for access to path. Note that most operations will use the effective uid/gid, therefore this routine can be used in a suid/sgid environment to test if the invoking user has the specified access to path. mode should be F_OK to test the existence of path, or it can be the inclusive OR of one or more of R_OK, W_OK, and X_OK to test permissions. Return True if access is allowed, False if not. See the Unix man page access(2) for more information. This function can support specifying paths relative to directory descriptors and not following symlinks. If effective_ids is True, access() will perform its access checks using the effective uid/gid instead of the real uid/gid. effective_ids may not be supported on your platform; you can check whether or not it is available using os.supports_effective_ids. If it is unavailable, using it will raise a NotImplementedError.  Note Using access() to check if a user is authorized to e.g. open a file before actually doing so using open() creates a security hole, because the user might exploit the short time interval between checking and opening the file to manipulate it. It’s preferable to use EAFP techniques. For example: if os.access("myfile", os.R_OK):
    with open("myfile") as fp:
        return fp.read()
return "some default data"
 is better written as: try:
    fp = open("myfile")
except PermissionError:
    return "some default data"
else:
    with fp:
        return fp.read()
   Note I/O operations may fail even when access() indicates that they would succeed, particularly for operations on network filesystems which may have permissions semantics beyond the usual POSIX permission-bit model.   Changed in version 3.3: Added the dir_fd, effective_ids, and follow_symlinks parameters.   Changed in version 3.6: Accepts a path-like object.
os.add_dll_directory(path)  
Add a path to the DLL search path. This search path is used when resolving dependencies for imported extension modules (the module itself is resolved through sys.path), and also by ctypes. Remove the directory by calling close() on the returned object or using it in a with statement. See the Microsoft documentation for more information about how DLLs are loaded. Raises an auditing event os.add_dll_directory with argument path. Availability: Windows.  New in version 3.8: Previous versions of CPython would resolve DLLs using the default behavior for the current process. This led to inconsistencies, such as only sometimes searching PATH or the current working directory, and OS functions such as AddDllDirectory having no effect. In 3.8, the two primary ways DLLs are loaded now explicitly override the process-wide behavior to ensure consistency. See the porting notes for information on updating libraries.
os.altsep  
An alternative character used by the operating system to separate pathname components, or None if only one separator character exists. This is set to '/' on Windows systems where sep is a backslash. Also available via os.path.
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. This function can raise OSError and subclasses such as FileNotFoundError, PermissionError, and NotADirectoryError. Raises an auditing event os.chdir with argument path.  New in version 3.3: Added support for specifying path as a file descriptor on some platforms.   Changed in version 3.6: Accepts a path-like object.
os.chflags(path, flags, *, follow_symlinks=True)  
Set the flags of path to the numeric flags. flags may take a combination (bitwise OR) of the following values (as defined in the stat module):  stat.UF_NODUMP stat.UF_IMMUTABLE stat.UF_APPEND stat.UF_OPAQUE stat.UF_NOUNLINK stat.UF_COMPRESSED stat.UF_HIDDEN stat.SF_ARCHIVED stat.SF_IMMUTABLE stat.SF_APPEND stat.SF_NOUNLINK stat.SF_SNAPSHOT  This function can support not following symlinks. Raises an auditing event os.chflags with arguments path, flags. Availability: Unix.  New in version 3.3: The follow_symlinks argument.   Changed in version 3.6: Accepts a path-like object.
os.chmod(path, mode, *, dir_fd=None, follow_symlinks=True)  
Change the mode of path to the numeric mode. mode may take one of the following values (as defined in the stat module) or bitwise ORed combinations of them:  stat.S_ISUID stat.S_ISGID stat.S_ENFMT stat.S_ISVTX stat.S_IREAD stat.S_IWRITE stat.S_IEXEC stat.S_IRWXU stat.S_IRUSR stat.S_IWUSR stat.S_IXUSR stat.S_IRWXG stat.S_IRGRP stat.S_IWGRP stat.S_IXGRP stat.S_IRWXO stat.S_IROTH stat.S_IWOTH stat.S_IXOTH  This function can support specifying a file descriptor, paths relative to directory descriptors and not following symlinks.  Note Although Windows supports chmod(), you can only set the file’s read-only flag with it (via the stat.S_IWRITE and stat.S_IREAD constants or a corresponding integer value). All other bits are ignored.  Raises an auditing event os.chmod with arguments path, mode, dir_fd.  New in version 3.3: Added support for specifying path as an open file descriptor, and the dir_fd and follow_symlinks arguments.   Changed in version 3.6: Accepts a path-like object.
os.chown(path, uid, gid, *, dir_fd=None, follow_symlinks=True)  
Change the owner and group id of path to the numeric uid and gid. To leave one of the ids unchanged, set it to -1. This function can support specifying a file descriptor, paths relative to directory descriptors and not following symlinks. See shutil.chown() for a higher-level function that accepts names in addition to numeric ids. Raises an auditing event os.chown with arguments path, uid, gid, dir_fd. Availability: Unix.  New in version 3.3: Added support for specifying path as an open file descriptor, and the dir_fd and follow_symlinks arguments.   Changed in version 3.6: Supports a path-like object.
os.chroot(path)  
Change the root directory of the current process to path. Availability: Unix.  Changed in version 3.6: Accepts a path-like object.
os.CLD_EXITED  
os.CLD_KILLED  
os.CLD_DUMPED  
os.CLD_TRAPPED  
os.CLD_STOPPED  
os.CLD_CONTINUED  
These are the possible values for si_code in the result returned by waitid(). Availability: Unix.  New in version 3.3.   Changed in version 3.9: Added CLD_KILLED and CLD_STOPPED values.
os.close(fd)  
Close file descriptor fd.  Note This function is intended for low-level I/O and must be applied to a file descriptor as returned by os.open() or pipe(). To close a “file object” returned by the built-in function open() or by popen() or fdopen(), use its close() method.