Callables.with_name_prefix()

with_name_prefix(prefix: str, sensitivity: bool = True) → Callables

Adds a filter to get callables whose names have the given prefix. Returns a filtered Callables child object. This method can be called on all Callables child classes: Functions and Modifiers.

To filter given a list of prefixes, refer to Callables.with_name_prefixes().

Functions Example

from glider import *

def query():
  # Retrieve the functions that have `min` as prefix
  functions = Functions().with_name_prefix("min").exec(100)

  # Return the first five functions
  return functions[:4]

Output:

Modifiers Example

from glider import *

def query():
  # Retrieve the modifiers that have `only` as prefix
  modifiers = Modifiers().with_name_prefix("only").exec(100)

  # Return the first five modifiers
  return modifiers[:4]

Output:

Last updated