Steven D'Aprano <steve+pyt...@pearwood.info> added the comment: Oh I can just imagine the bike-shedding on this one :-)
I'm not really convinced this is needed, but for what it's worth I think that given the intended use-case (checking function parameters) ValueError would be a more appropriate default exception type. The given argument has the wrong value, hence ValueError. On the other hand, it is more common (at least for me) to check arguments with isinstance, so maybe the default should be TypeError. Definitely needs a PEP. ---------- nosy: +steven.daprano stage: needs patch -> _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32590> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com