CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-wtfpython

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

Overall
score

93%

Overview
Eval results
Files

rubric.jsonevals/scenario-3/

{
  "context": "This evaluation assesses how well the engineer demonstrates understanding of Python's string interning mechanism and the distinction between identity (is) and equality (==) operators through correct implementation of the wtfpython-based analysis functions.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Identity operator usage",
      "description": "Uses the 'is' operator correctly in compare_strings() to check object identity between the two string parameters",
      "max_score": 15
    },
    {
      "name": "Equality operator usage",
      "description": "Uses the '==' operator correctly in compare_strings() to check value equality between the two string parameters",
      "max_score": 15
    },
    {
      "name": "String length check",
      "description": "Checks string length in will_be_interned() to determine if string is under the interning threshold (typically 20 or 21 characters)",
      "max_score": 20
    },
    {
      "name": "Special character detection",
      "description": "Detects presence of spaces or special characters in will_be_interned() to determine if string will not be interned",
      "max_score": 20
    },
    {
      "name": "ASCII-only validation",
      "description": "Checks if string contains only ASCII alphanumeric characters in will_be_interned() as a criterion for interning",
      "max_score": 15
    },
    {
      "name": "Return type correctness",
      "description": "Returns the correct data types from both functions: bool from will_be_interned() and dict with 'equal' and 'identical' keys from compare_strings()",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/pypi-wtfpython

tile.json