neulab/docprompting-conala huggingface dataset:
Wave_read.rewind()  
Rewind the file pointer to the beginning of the audio stream.
Wave_write.close()  
Make sure nframes is correct, and close the file if it was opened by wave. This method is called upon object collection. It will raise an exception if the output stream is not seekable and nframes does not match the number of frames actually written.
Wave_write.setcomptype(type, name)  
Set the compression type and description. At the moment, only compression type NONE is supported, meaning no compression.
Wave_write.setframerate(n)  
Set the frame rate to n.  Changed in version 3.2: A non-integral input to this method is rounded to the nearest integer.
Wave_write.setnframes(n)  
Set the number of frames to n. This will be changed later if the number of frames actually written is different (this update attempt will raise an error if the output stream is not seekable).
Wave_write.setparams(tuple)  
The tuple should be (nchannels, sampwidth, framerate, nframes, comptype,
compname), with values valid for the set*() methods. Sets all parameters.
Wave_write.setsampwidth(n)  
Set the sample width to n bytes.
Wave_write.tell()  
Return current position in the file, with the same disclaimer for the Wave_read.tell() and Wave_read.setpos() methods.
Wave_write.writeframes(data)  
Write audio frames and make sure nframes is correct. It will raise an error if the output stream is not seekable and the total number of frames that have been written after data has been written does not match the previously set value for nframes.  Changed in version 3.4: Any bytes-like object is now accepted.
Wave_write.writeframesraw(data)  
Write audio frames, without correcting nframes.  Changed in version 3.4: Any bytes-like object is now accepted.
class weakref.finalize(obj, func, /, *args, **kwargs)  
Return a callable finalizer object which will be called when obj is garbage collected. Unlike an ordinary weak reference, a finalizer will always survive until the reference object is collected, greatly simplifying lifecycle management. A finalizer is considered alive until it is called (either explicitly or at garbage collection), and after that it is dead. Calling a live finalizer returns the result of evaluating func(*arg, **kwargs), whereas calling a dead finalizer returns None. Exceptions raised by finalizer callbacks during garbage collection will be shown on the standard error output, but cannot be propagated. They are handled in the same way as exceptions raised from an object’s __del__() method or a weak reference’s callback. When the program exits, each remaining live finalizer is called unless its atexit attribute has been set to false. They are called in reverse order of creation. A finalizer will never invoke its callback during the later part of the interpreter shutdown when module globals are liable to have been replaced by None.  
__call__()  
If self is alive then mark it as dead and return the result of calling func(*args, **kwargs). If self is dead then return None. 
  
detach()  
If self is alive then mark it as dead and return the tuple (obj, func, args, kwargs). If self is dead then return None. 
  
peek()  
If self is alive then return the tuple (obj, func, args,
kwargs). If self is dead then return None. 
  
alive  
Property which is true if the finalizer is alive, false otherwise. 
  
atexit  
A writable boolean property which by default is true. When the program exits, it calls all remaining live finalizers for which atexit is true. They are called in reverse order of creation. 
  Note It is important to ensure that func, args and kwargs do not own any references to obj, either directly or indirectly, since otherwise obj will never be garbage collected. In particular, func should not be a bound method of obj.   New in version 3.4.
atexit  
A writable boolean property which by default is true. When the program exits, it calls all remaining live finalizers for which atexit is true. They are called in reverse order of creation.
detach()  
If self is alive then mark it as dead and return the tuple (obj, func, args, kwargs). If self is dead then return None.
peek()  
If self is alive then return the tuple (obj, func, args,
kwargs). If self is dead then return None.
__call__()  
If self is alive then mark it as dead and return the result of calling func(*args, **kwargs). If self is dead then return None.
weakref.getweakrefcount(object)  
Return the number of weak references and proxies which refer to object.
weakref.getweakrefs(object)  
Return a list of all weak reference and proxy objects which refer to object.
weakref.proxy(object[, callback])  
Return a proxy to object which uses a weak reference. This supports use of the proxy in most contexts instead of requiring the explicit dereferencing used with weak reference objects. The returned object will have a type of either ProxyType or CallableProxyType, depending on whether object is callable. Proxy objects are not hashable regardless of the referent; this avoids a number of problems related to their fundamentally mutable nature, and prevent their use as dictionary keys. callback is the same as the parameter of the same name to the ref() function.  Changed in version 3.8: Extended the operator support on proxy objects to include the matrix multiplication operators @ and @=.
weakref.ProxyType  
The type object for proxies of objects which are not callable.
weakref.ProxyTypes  
Sequence containing all the type objects for proxies. This can make it simpler to test if an object is a proxy without being dependent on naming both proxy types.
class weakref.ref(object[, callback])  
Return a weak reference to object. The original object can be retrieved by calling the reference object if the referent is still alive; if the referent is no longer alive, calling the reference object will cause None to be returned. If callback is provided and not None, and the returned weakref object is still alive, the callback will be called when the object is about to be finalized; the weak reference object will be passed as the only parameter to the callback; the referent will no longer be available. It is allowable for many weak references to be constructed for the same object. Callbacks registered for each weak reference will be called from the most recently registered callback to the oldest registered callback. Exceptions raised by the callback will be noted on the standard error output, but cannot be propagated; they are handled in exactly the same way as exceptions raised from an object’s __del__() method. Weak references are hashable if the object is hashable. They will maintain their hash value even after the object was deleted. If hash() is called the first time only after the object was deleted, the call will raise TypeError. Weak references support tests for equality, but not ordering. If the referents are still alive, two references have the same equality relationship as their referents (regardless of the callback). If either referent has been deleted, the references are equal only if the reference objects are the same object. This is a subclassable type rather than a factory function.  
__callback__  
This read-only attribute returns the callback currently associated to the weakref. If there is no callback or if the referent of the weakref is no longer alive then this attribute will have value None. 
  Changed in version 3.4: Added the __callback__ attribute.
__callback__  
This read-only attribute returns the callback currently associated to the weakref. If there is no callback or if the referent of the weakref is no longer alive then this attribute will have value None.
class weakref.WeakKeyDictionary([dict])  
Mapping class that references keys weakly. Entries in the dictionary will be discarded when there is no longer a strong reference to the key. This can be used to associate additional data with an object owned by other parts of an application without adding attributes to those objects. This can be especially useful with objects that override attribute accesses.  Changed in version 3.9: Added support for | and |= operators, specified in PEP 584.
WeakKeyDictionary.keyrefs()  
Return an iterable of the weak references to the keys.
class weakref.WeakMethod(method)  
A custom ref subclass which simulates a weak reference to a bound method (i.e., a method defined on a class and looked up on an instance). Since a bound method is ephemeral, a standard weak reference cannot keep hold of it. WeakMethod has special code to recreate the bound method until either the object or the original function dies: >>> class C:
...     def method(self):
...         print("method called!")
...
>>> c = C()
>>> r = weakref.ref(c.method)
>>> r()
>>> r = weakref.WeakMethod(c.method)
>>> r()
<bound method C.method of <__main__.C object at 0x7fc859830220>>
>>> r()()
method called!
>>> del c
>>> gc.collect()
0
>>> r()
>>>
  New in version 3.4.
class weakref.WeakSet([elements])  
Set class that keeps weak references to its elements. An element will be discarded when no strong reference to it exists any more.
class weakref.WeakValueDictionary([dict])  
Mapping class that references values weakly. Entries in the dictionary will be discarded when no strong reference to the value exists any more.  Changed in version 3.9: Added support for | and |= operators, as specified in PEP 584.
WeakValueDictionary.valuerefs()  
Return an iterable of the weak references to the values.
controller.open(url, new=0, autoraise=True)  
Display url using the browser handled by this controller. If new is 1, a new browser window is opened if possible. If new is 2, a new browser page (“tab”) is opened if possible.
controller.open_new(url)  
Open url in a new window of the browser handled by this controller, if possible, otherwise, open url in the only browser window. Alias open_new().
controller.open_new_tab(url)  
Open url in a new page (“tab”) of the browser handled by this controller, if possible, otherwise equivalent to open_new().
webbrowser.get(using=None)  
Return a controller object for the browser type using. If using is None, return a controller for a default browser appropriate to the caller’s environment.
webbrowser.open(url, new=0, autoraise=True)  
Display url using the default browser. If new is 0, the url is opened in the same browser window if possible. If new is 1, a new browser window is opened if possible. If new is 2, a new browser page (“tab”) is opened if possible. If autoraise is True, the window is raised if possible (note that under many window managers this will occur regardless of the setting of this variable). Note that on some platforms, trying to open a filename using this function, may work and start the operating system’s associated program. However, this is neither supported nor portable. Raises an auditing event webbrowser.open with argument url.
webbrowser.open_new(url)  
Open url in a new window of the default browser, if possible, otherwise, open url in the only browser window.
webbrowser.open_new_tab(url)  
Open url in a new page (“tab”) of the default browser, if possible, otherwise equivalent to open_new().
webbrowser.register(name, constructor, instance=None, *, preferred=False)  
Register the browser type name. Once a browser type is registered, the get() function can return a controller for that browser type. If instance is not provided, or is None, constructor will be called without parameters to create an instance when needed. If instance is provided, constructor will never be called, and may be None. Setting preferred to True makes this browser a preferred result for a get() call with no argument. Otherwise, this entry point is only useful if you plan to either set the BROWSER variable or call get() with a nonempty argument matching the name of a handler you declare.  Changed in version 3.7: preferred keyword-only parameter was added.
winreg.CloseKey(hkey)  
Closes a previously opened registry key. The hkey argument specifies a previously opened key.  Note If hkey is not closed using this method (or via hkey.Close()), it is closed when the hkey object is destroyed by Python.
winreg.ConnectRegistry(computer_name, key)  
Establishes a connection to a predefined registry handle on another computer, and returns a handle object. computer_name is the name of the remote computer, of the form r"\\computername". If None, the local computer is used. key is the predefined handle to connect to. The return value is the handle of the opened key. If the function fails, an OSError exception is raised. Raises an auditing event winreg.ConnectRegistry with arguments computer_name, key.  Changed in version 3.3: See above.
winreg.CreateKey(key, sub_key)  
Creates or opens the specified key, returning a handle object. key is an already open key, or one of the predefined HKEY_* constants. sub_key is a string that names the key this method opens or creates. If key is one of the predefined keys, sub_key may be None. In that case, the handle returned is the same key handle passed in to the function. If the key already exists, this function opens the existing key. The return value is the handle of the opened key. If the function fails, an OSError exception is raised. Raises an auditing event winreg.CreateKey with arguments key, sub_key, access. Raises an auditing event winreg.OpenKey/result with argument key.  Changed in version 3.3: See above.
winreg.CreateKeyEx(key, sub_key, reserved=0, access=KEY_WRITE)  
Creates or opens the specified key, returning a handle object. key is an already open key, or one of the predefined HKEY_* constants. sub_key is a string that names the key this method opens or creates. reserved is a reserved integer, and must be zero. The default is zero. access is an integer that specifies an access mask that describes the desired security access for the key. Default is KEY_WRITE. See Access Rights for other allowed values. If key is one of the predefined keys, sub_key may be None. In that case, the handle returned is the same key handle passed in to the function. If the key already exists, this function opens the existing key. The return value is the handle of the opened key. If the function fails, an OSError exception is raised. Raises an auditing event winreg.CreateKey with arguments key, sub_key, access. Raises an auditing event winreg.OpenKey/result with argument key.  New in version 3.2.   Changed in version 3.3: See above.
winreg.DeleteKey(key, sub_key)  
Deletes the specified key. key is an already open key, or one of the predefined HKEY_* constants. sub_key is a string that must be a subkey of the key identified by the key parameter. This value must not be None, and the key may not have subkeys. This method can not delete keys with subkeys. If the method succeeds, the entire key, including all of its values, is removed. If the method fails, an OSError exception is raised. Raises an auditing event winreg.DeleteKey with arguments key, sub_key, access.  Changed in version 3.3: See above.
winreg.DeleteKeyEx(key, sub_key, access=KEY_WOW64_64KEY, reserved=0)  
Deletes the specified key.  Note The DeleteKeyEx() function is implemented with the RegDeleteKeyEx Windows API function, which is specific to 64-bit versions of Windows. See the RegDeleteKeyEx documentation.  key is an already open key, or one of the predefined HKEY_* constants. sub_key is a string that must be a subkey of the key identified by the key parameter. This value must not be None, and the key may not have subkeys. reserved is a reserved integer, and must be zero. The default is zero. access is an integer that specifies an access mask that describes the desired security access for the key. Default is KEY_WOW64_64KEY. See Access Rights for other allowed values. This method can not delete keys with subkeys. If the method succeeds, the entire key, including all of its values, is removed. If the method fails, an OSError exception is raised. On unsupported Windows versions, NotImplementedError is raised. Raises an auditing event winreg.DeleteKey with arguments key, sub_key, access.  New in version 3.2.   Changed in version 3.3: See above.
winreg.DeleteValue(key, value)  
Removes a named value from a registry key. key is an already open key, or one of the predefined HKEY_* constants. value is a string that identifies the value to remove. Raises an auditing event winreg.DeleteValue with arguments key, value.
winreg.DisableReflectionKey(key)  
Disables registry reflection for 32-bit processes running on a 64-bit operating system. key is an already open key, or one of the predefined HKEY_* constants. Will generally raise NotImplementedError if executed on a 32-bit operating system. If the key is not on the reflection list, the function succeeds but has no effect. Disabling reflection for a key does not affect reflection of any subkeys. Raises an auditing event winreg.DisableReflectionKey with argument key.
winreg.EnableReflectionKey(key)  
Restores registry reflection for the specified disabled key. key is an already open key, or one of the predefined HKEY_* constants. Will generally raise NotImplementedError if executed on a 32-bit operating system. Restoring reflection for a key does not affect reflection of any subkeys. Raises an auditing event winreg.EnableReflectionKey with argument key.
winreg.EnumKey(key, index)  
Enumerates subkeys of an open registry key, returning a string. key is an already open key, or one of the predefined HKEY_* constants. index is an integer that identifies the index of the key to retrieve. The function retrieves the name of one subkey each time it is called. It is typically called repeatedly until an OSError exception is raised, indicating, no more values are available. Raises an auditing event winreg.EnumKey with arguments key, index.  Changed in version 3.3: See above.
winreg.EnumValue(key, index)  
Enumerates values of an open registry key, returning a tuple. key is an already open key, or one of the predefined HKEY_* constants. index is an integer that identifies the index of the value to retrieve. The function retrieves the name of one subkey each time it is called. It is typically called repeatedly, until an OSError exception is raised, indicating no more values. The result is a tuple of 3 items:   
Index Meaning   
0 A string that identifies the value name  
1 An object that holds the value data, and whose type depends on the underlying registry type  
2 An integer that identifies the type of the value data (see table in docs for SetValueEx())   Raises an auditing event winreg.EnumValue with arguments key, index.  Changed in version 3.3: See above.
winreg.ExpandEnvironmentStrings(str)  
Expands environment variable placeholders %NAME% in strings like REG_EXPAND_SZ: >>> ExpandEnvironmentStrings('%windir%')
'C:\\Windows'
 Raises an auditing event winreg.ExpandEnvironmentStrings with argument str.
winreg.FlushKey(key)  
Writes all the attributes of a key to the registry. key is an already open key, or one of the predefined HKEY_* constants. It is not necessary to call FlushKey() to change a key. Registry changes are flushed to disk by the registry using its lazy flusher. Registry changes are also flushed to disk at system shutdown. Unlike CloseKey(), the FlushKey() method returns only when all the data has been written to the registry. An application should only call FlushKey() if it requires absolute certainty that registry changes are on disk.  Note If you don’t know whether a FlushKey() call is required, it probably isn’t.
winreg.HKEY_CLASSES_ROOT  
Registry entries subordinate to this key define types (or classes) of documents and the properties associated with those types. Shell and COM applications use the information stored under this key.
winreg.HKEY_CURRENT_CONFIG  
Contains information about the current hardware profile of the local computer system.
winreg.HKEY_CURRENT_USER  
Registry entries subordinate to this key define the preferences of the current user. These preferences include the settings of environment variables, data about program groups, colors, printers, network connections, and application preferences.
winreg.HKEY_DYN_DATA  
This key is not used in versions of Windows after 98.
winreg.HKEY_LOCAL_MACHINE  
Registry entries subordinate to this key define the physical state of the computer, including data about the bus type, system memory, and installed hardware and software.
winreg.HKEY_PERFORMANCE_DATA  
Registry entries subordinate to this key allow you to access performance data. The data is not actually stored in the registry; the registry functions cause the system to collect the data from its source.
winreg.HKEY_USERS  
Registry entries subordinate to this key define the default user configuration for new users on the local computer and the user configuration for the current user.
winreg.KEY_ALL_ACCESS  
Combines the STANDARD_RIGHTS_REQUIRED, KEY_QUERY_VALUE, KEY_SET_VALUE, KEY_CREATE_SUB_KEY, KEY_ENUMERATE_SUB_KEYS, KEY_NOTIFY, and KEY_CREATE_LINK access rights.
winreg.KEY_CREATE_SUB_KEY  
Required to create a subkey of a registry key.
winreg.KEY_ENUMERATE_SUB_KEYS  
Required to enumerate the subkeys of a registry key.
winreg.KEY_NOTIFY  
Required to request change notifications for a registry key or for subkeys of a registry key.
winreg.KEY_QUERY_VALUE  
Required to query the values of a registry key.
winreg.KEY_READ  
Combines the STANDARD_RIGHTS_READ, KEY_QUERY_VALUE, KEY_ENUMERATE_SUB_KEYS, and KEY_NOTIFY values.
winreg.KEY_SET_VALUE  
Required to create, delete, or set a registry value.
winreg.KEY_WOW64_32KEY  
Indicates that an application on 64-bit Windows should operate on the 32-bit registry view.
winreg.KEY_WOW64_64KEY  
Indicates that an application on 64-bit Windows should operate on the 64-bit registry view.
winreg.KEY_WRITE  
Combines the STANDARD_RIGHTS_WRITE, KEY_SET_VALUE, and KEY_CREATE_SUB_KEY access rights.
winreg.LoadKey(key, sub_key, file_name)  
Creates a subkey under the specified key and stores registration information from a specified file into that subkey. key is a handle returned by ConnectRegistry() or one of the constants HKEY_USERS or HKEY_LOCAL_MACHINE. sub_key is a string that identifies the subkey to load. file_name is the name of the file to load registry data from. This file must have been created with the SaveKey() function. Under the file allocation table (FAT) file system, the filename may not have an extension. A call to LoadKey() fails if the calling process does not have the SE_RESTORE_PRIVILEGE privilege. Note that privileges are different from permissions – see the RegLoadKey documentation for more details. If key is a handle returned by ConnectRegistry(), then the path specified in file_name is relative to the remote computer. Raises an auditing event winreg.LoadKey with arguments key, sub_key, file_name.
winreg.OpenKey(key, sub_key, reserved=0, access=KEY_READ)  
winreg.OpenKeyEx(key, sub_key, reserved=0, access=KEY_READ)  
Opens the specified key, returning a handle object. key is an already open key, or one of the predefined HKEY_* constants. sub_key is a string that identifies the sub_key to open. reserved is a reserved integer, and must be zero. The default is zero. access is an integer that specifies an access mask that describes the desired security access for the key. Default is KEY_READ. See Access Rights for other allowed values. The result is a new handle to the specified key. If the function fails, OSError is raised. Raises an auditing event winreg.OpenKey with arguments key, sub_key, access. Raises an auditing event winreg.OpenKey/result with argument key.  Changed in version 3.2: Allow the use of named arguments.   Changed in version 3.3: See above.
PyHKEY.Close()  
Closes the underlying Windows handle. If the handle is already closed, no error is raised.
PyHKEY.Detach()  
Detaches the Windows handle from the handle object. The result is an integer that holds the value of the handle before it is detached. If the handle is already detached or closed, this will return zero. After calling this function, the handle is effectively invalidated, but the handle is not closed. You would call this function when you need the underlying Win32 handle to exist beyond the lifetime of the handle object. Raises an auditing event winreg.PyHKEY.Detach with argument key.