News for hackers. Stuff that matters.
Re:Type hints – a mediocre programmer's reaction (2015) by snuxoll on Thursday March 17, 2016 @04:38PM (#11307407)
> Couldn't they use helper methods to convert all those types he brought up to a single common type that they annotated with?

But then it wouldn't be "pythonic". To be frank though, I think being too generous with your inputs is just asking for maintenance hell. I don't see why requests feels the need to allow data in so many different formats when one or two + conversion functions for anything else would be sufficient.

Re:Type hints – a mediocre programmer's reaction (2015) by taneq on Thursday March 17, 2016 @08:33PM (#11308919)
In my (limited) Python experience, this kind of amorphous-blob-of-properties interface is great fun to write but is absolute hell to decipher later, especially if you're not the person who wrote it. You end up having to read the entire function and usually recurse through most of the things it calls in order to even know how to call it. That's maybe not so much of an issue if you're just writing small self-contained scripts, but an interface to an API it's awful.
Re:Type hints – a mediocre programmer's reaction (2015) by seivan on Thursday March 17, 2016 @04:44PM (#11307442)
I've come to realize it's an addiction/urge, that's the only /reasonable/ answer I can give.
Re:Type hints – a mediocre programmer's reaction (2015) by seanp2k2 on Thursday March 17, 2016 @08:07PM (#11308751)
https://en.m.wikipedia.org/wiki/Robustness_principle

""" Be conservative in what you do, be liberal in what you accept from others (often reworded as "Be conservative in what you send, be liberal in what you accept"). """

Re:Type hints – a mediocre programmer's reaction (2015) by taneq on Thursday March 17, 2016 @08:36PM (#11308942)
Didn't we decide later that that's a bad idea? I mean, in the early days of the web, Internet Explorer was the very embodiment of this principle and a couple of decades later the internet is still full of the resulting non-standard crud.
Re:Type hints – a mediocre programmer's reaction (2015) by lomnakkus on Friday March 18, 2016 @01:09AM (#11310036)
Yes we did. It can also lead to really surprising security issues in protocol-land where such "liberalism" interacts badly with security-sensitive portions of protocols.

(Security is non-trivial and mostly there are very good reasons that things are exactly as they are in such protocols.)