Checking Signature of Function Parameter

Dan Stromberg drsalists at
Mon Aug 29 17:14:43 CEST 2011

On Sun, Aug 28, 2011 at 2:20 PM, Travis Parks <jehugaleahsa at>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: <>

More information about the Python-list mailing list