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
33ee76ae
Commit
33ee76ae
authored
Jul 28, 2004
by
Skip Montanaro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
A little boolean music if you please, maestro... (Not sure I have the
versionadded{} args quite right).
parent
efdc16ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
Doc/api/concrete.tex
Doc/api/concrete.tex
+34
-0
No files found.
Doc/api/concrete.tex
View file @
33ee76ae
...
...
@@ -192,6 +192,40 @@ There is no \cfunction{PyNone_Check()} function for the same reason.
header files).
\end{cfuncdesc}
\subsubsection
{
Boolean Objects
\label
{
boolObjects
}}
Booleans in Python are implemented as a subclass of integers. There
are only two booleans,
\constant
{
Py
_
False
}
and
\constant
{
Py
_
True
}
. As
such, the normal creation and deletion functions don't apply to
booleans. The following macros are available, however.
\begin{cfuncdesc}
{
int
}{
PyBool
_
Check
}{
PyObject* o
}
Returns true if
\var
{
o
}
is of type
\cdata
{
PyBool
_
Type
}
.
\versionadded
{
2.3
}
\end{cfuncdesc}
\begin{cfuncdesc}
{
Py
_
RETURN
_
FALSE
}
Return Py
_
False from a function, properly incrementing its reference
count.
\versionadded
{
2.4
}
\end{cfuncdesc}
\begin{cfuncdesc}
{
Py
_
RETURN
_
TRUE
}
Return Py
_
True from a function, properly incrementing its reference
count.
\versionadded
{
2.4
}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyBool
_
Check
}{
PyObject* o
}
Returns true if
\var
{
o
}
is of type
\cdata
{
PyBool
_
Type
}
.
\versionadded
{
2.3
}
\end{cfuncdesc}
\begin{cfuncdesc}
{
int
}{
PyBool
_
FromLong
}{
long v
}
Returns
\constant
{
Py
_
True
}
or
\constant
{
Py
_
False
}
depending on the
truth value of
\var
{
v
}
.
\versionadded
{
2.3
}
\end{cfuncdesc}
\subsection
{
Long Integer Objects
\label
{
longObjects
}}
...
...
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