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
2e6bb448
Commit
2e6bb448
authored
May 29, 2017
by
Amit Kumar
Committed by
Nick Coghlan
May 29, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add reference to help('FORMATTING') in format() builtin (GH-166)
parent
ac5bbd43
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
Python/bltinmodule.c
Python/bltinmodule.c
+4
-2
Python/clinic/bltinmodule.c.h
Python/clinic/bltinmodule.c.h
+4
-2
No files found.
Python/bltinmodule.c
View file @
2e6bb448
...
...
@@ -578,12 +578,14 @@ format as builtin_format
Return value.__format__(format_spec)
format_spec defaults to the empty string
format_spec defaults to the empty string.
See the Format Specification Mini-Language section of help('FORMATTING') for
details.
[clinic start generated code]*/
static
PyObject
*
builtin_format_impl
(
PyObject
*
module
,
PyObject
*
value
,
PyObject
*
format_spec
)
/*[clinic end generated code: output=2f40bdfa4954b077 input=
6325e751a1b29b86
]*/
/*[clinic end generated code: output=2f40bdfa4954b077 input=
88339c93ea522b33
]*/
{
return
PyObject_Format
(
value
,
format_spec
);
}
...
...
Python/clinic/bltinmodule.c.h
View file @
2e6bb448
...
...
@@ -77,7 +77,9 @@ PyDoc_STRVAR(builtin_format__doc__,
"
\n
"
"Return value.__format__(format_spec)
\n
"
"
\n
"
"format_spec defaults to the empty string"
);
"format_spec defaults to the empty string.
\n
"
"See the Format Specification Mini-Language section of help(
\'
FORMATTING
\'
) for
\n
"
"details."
);
#define BUILTIN_FORMAT_METHODDEF \
{"format", (PyCFunction)builtin_format, METH_FASTCALL, builtin_format__doc__},
...
...
@@ -722,4 +724,4 @@ builtin_issubclass(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject
exit:
return
return_value
;
}
/*[clinic end generated code: output=
3234725ef4d8bbf1
input=a9049054013a1b77]*/
/*[clinic end generated code: output=
17fedd2dec148677
input=a9049054013a1b77]*/
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