A simple immutable dictionary implementation with hashing support and performance optimizations
85
{
"context": "This evaluation assesses how well the engineer uses frozendict's hashability features to implement a configuration cache system. The focus is on proper usage of frozendict as dictionary keys, in sets, and for creating immutable nested structures.",
"type": "weighted_checklist",
"checklist": [
{
"name": "frozendict Import",
"description": "Imports frozendict from the frozendict package",
"max_score": 5
},
{
"name": "Nested Structure Conversion",
"description": "Uses frozendict (or deepfreeze) to convert nested dictionaries into immutable frozendict structures, ensuring all levels of nesting are handled",
"max_score": 25
},
{
"name": "Dictionary Key Usage",
"description": "Uses frozendict instances as dictionary keys in the internal storage mechanism (e.g., mapping configurations to timestamps)",
"max_score": 30
},
{
"name": "Set Membership",
"description": "Uses frozendict instances in a set data structure for tracking unique configurations or implements get_all_configs returning a set of frozendict instances",
"max_score": 25
},
{
"name": "Hash Computation",
"description": "Relies on frozendict's built-in hash() method for hashability, rather than implementing custom hashing logic",
"max_score": 10
},
{
"name": "Test Implementation",
"description": "Implements all test cases correctly, demonstrating that frozendict-based solution handles simple configs, nested configs, duplicates, existence checks, counting, and set operations",
"max_score": 5
}
]
}Install with Tessl CLI
npx tessl i tessl/pypi-frozendictevals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10