Skip to content

Generics practice problems in Python

Difficulty:
Category & tags Filters active
Category:
Tag:

Showing 25 of 25

Title Difficulty
Accept Any Fetcher You Can Await Medium
Accept Read-Only Inputs and Return Concrete Results Medium
Bring Thread Errors Back to the Caller Medium
Build a Blocking Queue with a Condition Medium
Build a Generic Result Class Medium
Build a Generic Result Type with Ok and Err Hard
Build a Thread-Safe Cache with One Lock per Key Hard
Capstone: Build an Async Worker Pool with Retries and Clean Shutdown Hard
Diff Two Dataclass Records Field by Field Hard
Fetch Many Pages with a TaskGroup Medium
Fix the Variance of a Serializer and a Parser Hard
Keep the Type at Each Tuple Position with TypeVarTuple Hard
Limit a Type Parameter with Bounds and Constraints Hard
Partition and Chunk a List with Generic Helpers Medium
Placement 1/6: Make a Generic Class Read-Only Medium
Remove Duplicates in Order and Keep the Latest Items Easy
Restrict One Method to String Builders with Self Types Medium
Return Errors as Values with a Result Type Hard
Run Async Cleanup Without Hiding the Real Error Hard
Run Code in a Subinterpreter and Check the Result Medium
Translate Library Errors into Your Own Medium
Type a Lookup with a Default Using Overloads Hard
Type-Check the Arguments You Send to a Worker Medium
Write a Pool Map That Reports Every Failure Medium
Write a Sync Wrapper for Async Code Easy