Skip to main content
← CoursesSenior Deep-DivesModule 2 · CPython Internals & PerformanceGeneric protocols (typing.Protocol with TypeVar)quiz30 / 101
💬 Discuss🧪 Playground+125 XP
Task
📝 **Question:** You want callers to pass anything with a `.read() -> str` method into your function, without forcing inheritance. Right typing tool? 📋 Pick the right answer. 💡 **Hint:** Re-read the theory above if unsure.

Keep going

🎯 Quiz

Question

📝 **Question:** You want callers to pass anything with a `.read() -> str` method into your function, without forcing inheritance. Right typing tool? 📋 Pick the right answer. 💡 **Hint:** Re-read the theory above if unsure.
📣 Help someone learn PythonShare this lesson with a friend — the first 15 are free, no signup.Tweet

💬 Discussion

Be the first to ask a question or share a tip.
Sign in to join the discussion. Reading is free.
Loading discussion…