-
-
Notifications
You must be signed in to change notification settings - Fork 33.1k
Closed as not planned
Labels
Description
I have written the following function :
def cand (a,b) :
if (a) :
if (b) :
return true
else :
return false
else :
return false
If I (try to) call it with :
i = 'none'
limit = 5
cand (type (i) is int, i > limit)
I get an error :
TypeError: '>' not supported between instances of 'int' and 'str'
In fact the function is not called. If I put a print in it, it is not displayed.
For me it is a bug. The function must be called and the second element not evaluated before calling the function but only if requested by the function code.
CPython versions tested on:
3.13
Operating systems tested on:
Windows