From 718ea1efb924e39ce98c5cd74dd8406c143cd80e Mon Sep 17 00:00:00 2001 From: =?utf8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Fri, 31 Oct 2003 15:34:16 +0000 Subject: [PATCH] Patch #830858: Correct the number of is-functions. --- Doc/lib/libinspect.tex | 2 +- Lib/test/test_inspect.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/Doc/lib/libinspect.tex b/Doc/lib/libinspect.tex index 2429c7dd1651..3cd04f9b7cde 100644 --- a/Doc/lib/libinspect.tex +++ b/Doc/lib/libinspect.tex @@ -25,7 +25,7 @@ and functions, and examining the interpreter stack. The \function{getmembers()} function retrieves the members of an object such as a class or module. -The nine functions whose names begin with ``is'' are mainly +The eleven functions whose names begin with ``is'' are mainly provided as convenient choices for the second argument to \function{getmembers()}. They also help you determine when you can expect to find the following special attributes: diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py index 9da669428702..3ff08b7d8a8c 100644 --- a/Lib/test/test_inspect.py +++ b/Lib/test/test_inspect.py @@ -370,3 +370,7 @@ test(args == ['self'], 'A.m args') test(varargs is None, 'A.m varargs') test(varkw is None, 'A.m varkw') test(defaults is None, 'A.m defaults') + +# Doc/lib/libinspect.tex claims there are 11 such functions +count = len(filter(lambda x:x.startswith('is'), dir(inspect))) +test(count == 11, "There are %d (not 11) is* functions", count) -- 2.47.3