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
5ccd57ef
Commit
5ccd57ef
authored
Aug 25, 2004
by
Martin v. Löwis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Patch #1015021: Stop claiming that coerce can return None.
Will backport to 2.3.
parent
35fa8d5c
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
Doc/lib/libfuncs.tex
Doc/lib/libfuncs.tex
+1
-1
Python/bltinmodule.c
Python/bltinmodule.c
+4
-4
No files found.
Doc/lib/libfuncs.tex
View file @
5ccd57ef
...
@@ -1180,7 +1180,7 @@ bypass these functions without concerns about missing something important.
...
@@ -1180,7 +1180,7 @@ bypass these functions without concerns about missing something important.
\begin{funcdesc}
{
coerce
}{
x, y
}
\begin{funcdesc}
{
coerce
}{
x, y
}
Return a tuple consisting of the two numeric arguments converted to
Return a tuple consisting of the two numeric arguments converted to
a common type, using the same rules as used by arithmetic
a common type, using the same rules as used by arithmetic
operations.
operations.
If coercion is not possible, raise
\exception
{
TypeError
}
.
\end{funcdesc}
\end{funcdesc}
\begin{funcdesc}
{
intern
}{
string
}
\begin{funcdesc}
{
intern
}{
string
}
...
...
Python/bltinmodule.c
View file @
5ccd57ef
...
@@ -322,11 +322,11 @@ builtin_coerce(PyObject *self, PyObject *args)
...
@@ -322,11 +322,11 @@ builtin_coerce(PyObject *self, PyObject *args)
}
}
PyDoc_STRVAR
(
coerce_doc
,
PyDoc_STRVAR
(
coerce_doc
,
"coerce(x, y) ->
None or
(x1, y1)
\n
\
"coerce(x, y) -> (x1, y1)
\n
\
\n
\
\n
\
When x and y can be coerced to values of the same type, return a tuple
\n
\
Return a tuple consisting of the two numeric arguments converted to
\n
\
containing the coerced values. When they can't be coerced, return None."
);
a common type, using the same rules as used by arithmetic operations.
\n
\
If coercion is not possible, raise TypeError."
);
static
PyObject
*
static
PyObject
*
builtin_compile
(
PyObject
*
self
,
PyObject
*
args
)
builtin_compile
(
PyObject
*
self
,
PyObject
*
args
)
...
...
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