diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-11-27 22:00:11 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-11-27 22:00:11 (GMT) |
commit | e71362d3dee9de626abb7d2d564550b5e59a1151 (patch) | |
tree | 1703c0a9f8d209b9dbff568a20f49a3541185dde /Lib/test/test_bool.py | |
parent | dc9b17d922ba30cbfbcc767dfb0738b6bf66015d (diff) | |
download | cpython-e71362d3dee9de626abb7d2d564550b5e59a1151.zip cpython-e71362d3dee9de626abb7d2d564550b5e59a1151.tar.gz cpython-e71362d3dee9de626abb7d2d564550b5e59a1151.tar.bz2 |
Issue #10518: Bring back the callable() builtin.
Approved by Guido (BDFL) and Georg (RM).
Diffstat (limited to 'Lib/test/test_bool.py')
-rw-r--r-- | Lib/test/test_bool.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/test/test_bool.py b/Lib/test/test_bool.py index 7282c0a..b296870 100644 --- a/Lib/test/test_bool.py +++ b/Lib/test/test_bool.py @@ -174,8 +174,8 @@ class BoolTest(unittest.TestCase): self.assertIs(hasattr([], "wobble"), False) def test_callable(self): - self.assertIs(hasattr(len, '__call__'), True) - self.assertIs(hasattr(1, '__call__'), False) + self.assertIs(callable(len), True) + self.assertIs(callable(1), False) def test_isinstance(self): self.assertIs(isinstance(True, bool), True) |