News for hackers. Stuff that matters.
Re:Reasons Python Sucks by nitely on Tuesday December 18, 2018 @07:24PM (#18711908)
The pythonic way is to do duck typing, meaning don't check the params types at all. Assertions are ok to check things that should never happen. But if you're gonna put them everywhere then better use type hints. I'd use TypeError on public APIs, for private APIs is as bad/good as assert.
Re:Reasons Python Sucks by dbcurtis on Tuesday December 18, 2018 @10:45PM (#18712848)
What I describe is duck typing, with eager authentication of duck specie. Exceptions raised at point where the greatest clarity of error message is possible.

Aspirationally, anyway.