Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
893ffa43
Commit
893ffa43
authored
Oct 31, 2003
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #830858: Correct the number of is-functions. Backported to 2.3 and 2.2.
parent
04570dbe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
1 deletion
+5
-1
Doc/lib/libinspect.tex
Doc/lib/libinspect.tex
+1
-1
Lib/test/test_inspect.py
Lib/test/test_inspect.py
+4
-0
No files found.
Doc/lib/libinspect.tex
View file @
893ffa43
...
...
@@ -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:
...
...
Lib/test/test_inspect.py
View file @
893ffa43
...
...
@@ -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
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment