Talin wrote: > This 'isFunction' test that I am thinking of would only return true for > user defined functions, built-in functions, and similar objects; It > would not return true for classes or other objects that are technically > functions in a mathematically pure sense, but which normal people don't > think of as functions.
But what would it return for a user-defined class with a __call__ method? And if the answer to that is "True", what would it return for the following class: class AmIAFunctionOrNot(object): def __call__(self, *args, **kwds): raise TypeError("This object cannot be called.") > In other words, a function that does what most people expect it to, by > conforming to their intuitive idea of what a function is, Intuitive ideas are too fuzzy to translate into code. A rigorous specification is needed. -- Greg _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com