Add callable() to the list of functions returning 'bool'.

This commit is contained in:
Guido van Rossum 2002-03-10 03:36:14 +00:00
parent ec6a886793
commit d38b6f17e3
1 changed files with 5 additions and 4 deletions

View File

@ -137,10 +137,11 @@ Specification
result will be changed to return False or True instead of 0 or 1. result will be changed to return False or True instead of 0 or 1.
In particular, this affects comparisons (<, <=, ==, !=, >, >=, is, In particular, this affects comparisons (<, <=, ==, !=, >, >=, is,
is not, in, not it), the unary operator 'not', and built-in is not, in, not it), the unary operator 'not', and built-in
functions like hasattr(), isinstance() and issubclass(), the dict functions like callable(), hasattr(), isinstance() and
method has_key(), string methods endswith(), isalnum(), isalpha(), issubclass(), the dict method has_key(), string methods
isdigit(), islower(), isspace(), istitle(), isupper(), and endswith(), isalnum(), isalpha(), isdigit(), islower(), isspace(),
startswith(), and the closed attribute of file objects. istitle(), isupper(), and startswith(), and the closed attribute
of file objects.
Note that subclassing from int means that True+1 is valid and Note that subclassing from int means that True+1 is valid and
equals 2, and so on. This is important for backwards equals 2, and so on. This is important for backwards