LambdaType
types.LambdaType The type of user-defined functions and functions created by lambda expressions.Here is a python example that tests if a variable is a lambda expression
import types x = lambda d:d*d if type(x) == types.LambdaType: print("x is a LambdaType") else: print("x is not a LambdaType")
No comments:
Post a Comment