Skip to content
Advertisement

Tag: function-pointers

Why do function objects evaluate to True in python?

In python it is valid to make a construction like: I wish to ask what is the logic that a function pointer is evaluated to True. Why was this kind of construction inserted in the language? Answer A lot of things evaluate to True in Python. From the documentation on Boolean operators: In the context of Boolean operations, and also

Advertisement