Checking Signature of Function Parameter
Dan Stromberg
drsalists at gmail.com
Mon Aug 29 11:14:43 EDT 2011
On Sun, Aug 28, 2011 at 2:20 PM, Travis Parks <jehugaleahsa at gmail.com>wrote:
> There are some things I want to make sure of. 1) I want to make sure
> that source is iterable. 2) More importantly, I want to make sure that
> predicate is callable, accepting a thing, returning a bool.
>
You can check a lot of this stuff very inexpensively by using pylint,
pychecker or pyflakes.
I use pylint quite a bit. Along with many kinds of type errors (except
almost anything can be legitimately used in a boolean context), it'll detect
when you define an any(), hiding the builtin one.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20110829/b55a3a2d/attachment-0001.html>
More information about the Python-list
mailing list