or run

tessl search
Log in

Version

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

tessl/pypi-wtfpython

tessl install tessl/pypi-wtfpython@3.0.0

Educational collection of surprising Python code snippets that demonstrate counter-intuitive behaviors and language internals

Agent Success

Agent success rate when using this tile

93%

Improvement

Agent success rate improvement when using this tile compared to baseline

1.06x

Baseline

Agent success rate without this tile

88%

rubric.jsonevals/scenario-2/

{
  "context": "This criteria evaluates how well the engineer applies Python's built-in numeric operations and understands key numeric behaviors documented in wtfpython (banker's rounding via round(), string conversion limits, and float precision) to implement a financial calculator module.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses round() function",
      "description": "Uses Python's built-in round() function which implements banker's rounding (round half to even) by default to implement the round_amount function",
      "max_score": 30
    },
    {
      "name": "String length validation",
      "description": "Checks the length of the string before conversion using len() and raises ValueError for strings exceeding 4000 digits to prevent performance issues related to Python's integer string conversion limits",
      "max_score": 25
    },
    {
      "name": "Uses int() or float()",
      "description": "Uses Python's built-in int() or float() conversion functions to convert strings to numbers in the convert_string_to_number function",
      "max_score": 15
    },
    {
      "name": "Float precision check",
      "description": "Uses comparison with an epsilon value (e.g., abs(value - round(value, 10)) < 1e-9) or checks decimal representation to detect float precision errors in the is_precise function",
      "max_score": 30
    }
  ]
}