Reference 〉Function

Helipad.removeHook( str place, str|list[str] fname, bool removeall = False )

Removes one or more previously registered hooks by the function name.

Parameters

  • place str, required

    The hook from which to remove a function.

  • fname str|list[str], required

    The name of the function registered to the hook, or a list of such names. Hooks registered with an argument-less @heli.hook decorator will have the same name as place.

  • removeall bool, optional

    By default, this function will stop after the first instance of a hook function matching name. Setting removeall=True will remove all functions with the given name. This might be the case if multiple functions are hooked using an argument-less @heli.hook, in which case the functions will all have the name of the hook.

    Default value: False

Return Value bool|list[bool]

Whether a matching named hook function in fact existed and was removed, or a list corresponding to the elements of the name parameter if a list was passed.

Notes and Examples

  1. Contribute a Note

    Your email address will not be published. Required fields are marked *

    You may use limited HTML for formatting. Please embed blocks of code in <pre><code> </code></pre> tags.

History