News for hackers. Stuff that matters.
Re:Static types in Python by cabalamat on Friday October 14, 2016 @11:50AM (#12708897)
> In python nothing can guarantee at compile time that you are not passing a username variable in a method that accepts an email address

Is there no reason you could not create an Email class and have the method require its argument to be of that type?

Re:Static types in Python by minitech on Friday October 14, 2016 @01:15PM (#12709556)
> guarantee at compile time

If you’re talking about runtime type checks rather than mypy, well, they’re just verbose static types with less safety. (May as well just embrace the duck typing at that point by accessing email.local_part and letting the AttributeError propagate.)