Callables.with_arg_count()

with_arg_count(arg_count: int) → Callables

Adds a filter to get callables having specified argument count. Returns a filtered Callables child object. This method can be called on all Callables child classes: Functions and Modifiers.

Functions Example

from glider import *

def query():
  # Retrieve the functions that have 12 arguments
  functions = Functions().with_arg_count(12).exec(100)

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

Output:

Modifiers Example

from glider import *

def query():
  # Retrieve the modifiers that have 5 arguments
  modifiers = Modifiers().with_arg_count(5).exec(100)

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

Output:

Last updated