[Python-Dev] static typing of input arguments in signatures

Łukasz Langa lukasz at langa.pl
Thu Apr 24 20:02:35 CEST 2014


On Apr 19, 2014, at 11:05 AM, Ethan Furman <ethan at stoneleaf.us> wrote:

> Personal experience:  I have my own copy of paramiko because it type checks for strings, and I routinely use a str-subclass.

I have had that kind of problem myself in the past. Most of the time the core issue wasn’t type checking, it was how (badly) it was implemented. `assert obj.__class__ == list` being my favorite one (especially when any iterable would work just fine).

-- 
Best regards,
Łukasz Langa

WWW: http://lukasz.langa.pl/
Twitter: @llanga
IRC: ambv on #python-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140424/da6526e2/attachment.html>


More information about the Python-Dev mailing list