or run

tessl search
Log in

Version

Workspace
tessl
Visibility
Public
Created
Last updated
Describes
pypipkg:pypi/varname@0.15.x
tile.json

tessl/pypi-varname

tessl install tessl/pypi-varname@0.15.0

Dark magics about variable names in python

Agent Success

Agent success rate when using this tile

90%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.41x

Baseline

Agent success rate without this tile

64%

task.mdevals/scenario-1/

Variable Debug Logger

A utility that provides enhanced debugging output for variables and expressions during development.

Capabilities

Basic variable debugging

  • Prints a single variable with name count and value 42 in format "DEBUG: count=42" @test
  • Prints multiple variables name (value "Alice") and age (value 30) on separate lines @test

Customized debug output

  • Prints variable x with value 10 using custom prefix "LOG: " instead of default prefix @test
  • Prints variables a (value 1) and b (value 2) merged on a single line @test

Expression debugging

  • Prints an arithmetic expression x + y (where x=5 and y=3) showing both the expression source "x + y" and its result @test

Implementation

@generates

API

def debug_print(var, *more_vars, prefix="DEBUG: ", merge=False, show_expressions=False):
    """
    Print variables with their names and values for debugging purposes.

    Args:
        var: The first variable to print
        *more_vars: Additional variables to print
        prefix: String prefix for each debug line (default: "DEBUG: ")
        merge: If True, print all variables on one line; if False, print on separate lines
        show_expressions: If True, show full expression source code instead of just variable names

    The function prints to stdout in the format:
    - Single variable: "{prefix}{var_name}={var_value}"
    - Multiple variables (merge=False): Each on separate line
    - Multiple variables (merge=True): "{prefix}{var1_name}={var1_value}, {var2_name}={var2_value}"
    - With show_expressions=True: Shows full expression like "x + y=8" instead of just "x=5"
    """
    pass

Dependencies { .dependencies }

varname { .dependency }

Provides variable name and expression introspection capabilities for Python.

@satisfied-by