News for hackers. Stuff that matters.
Re:Why Today's Python Developers Are Embracing Type Hints by sgarland on Saturday September 27, 2025 @10:18PM (#45401201)
Yes, annotations allows you to use the declared types as they are, no strings.
Re:Why Today's Python Developers Are Embracing Type Hints by FreakLegion on Saturday September 27, 2025 @11:23PM (#45401495)
It turns them into thunks (formerly strings) automatically, an important detail if you're inspecting annotations at run time because the performance hit of resolving the actual type can be significant.
Re:Why Today's Python Developers Are Embracing Type Hints by sgarland on Sunday September 28, 2025 @10:29AM (#45404583)
TIL, thanks! It looks like 3.14 is also changing it so that all evaluations are lazy.