On Sun, Mar 25, 2018 at 06:52:09PM +1100, Chris Angelico wrote:

> If people are checking "if type(x) is types.FunctionType", they're
> doing it wrong.

That depends on what "it" is that they're doing.

If they want a callable, then they're doing it wrong.

If they want a function regardless of whether it's written in Python or 
C or Cython, then they're doing it wrong.

But if they *specifically* want a Python function, perhaps so they can 
pull it apart in ways you can't do to functions written in other 
languages, then it is fine.



-- 
Steve
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to