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
e3c3db59
Commit
e3c3db59
authored
Jan 11, 2008
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation for r5990[3567].
parent
2f32c392
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
36 additions
and
3 deletions
+36
-3
Doc/glossary.rst
Doc/glossary.rst
+7
-0
Doc/library/decimal.rst
Doc/library/decimal.rst
+5
-1
Doc/library/difflib.rst
Doc/library/difflib.rst
+4
-1
Doc/library/doctest.rst
Doc/library/doctest.rst
+4
-1
Doc/library/inspect.rst
Doc/library/inspect.rst
+16
-0
No files found.
Doc/glossary.rst
View file @
e3c3db59
...
...
@@ -339,6 +339,13 @@ Glossary
Mutable objects can change their value but keep their :func:`id`. See
also :term:`immutable`.
named tuple
A tuple subclass whose elements also are accessible as attributes via
fixed names (the class name and field names are indicated in the
individual documentation of a named tuple type, like ``TestResults(failed,
attempted)``). Named tuple classes are created by
:func:`collections.namedtuple`.
namespace
The place where a variable is stored. Namespaces are implemented as
dictionaries. There are the local, global and builtin namespaces as well
...
...
Doc/library/decimal.rst
View file @
e3c3db59
...
...
@@ -333,7 +333,11 @@ also have a number of specialized methods:
.. method:: Decimal.as_tuple()
Return a tuple representation of the number: ``(sign, digit_tuple, exponent)``.
Return a :term:`named tuple` representation of the number:
``DecimalTuple(sign, digits, exponent)``.
.. versionchanged:: 2.6
Use a named tuple.
.. method:: Decimal.canonical()
...
...
Doc/library/difflib.rst
View file @
e3c3db59
...
...
@@ -344,7 +344,7 @@ use :meth:`set_seq2` to set the commonly used sequence once and call
Find longest matching block in ``a[alo:ahi]`` and ``b[blo:bhi]``.
If *isjunk* was omitted or ``None``, :meth:`
get
_longest_match` returns ``(i, j,
If *isjunk* was omitted or ``None``, :meth:`
find
_longest_match` returns ``(i, j,
k)`` such that ``a[i:i+k]`` is equal to ``b[j:j+k]``, where ``alo <= i <= i+k <=
ahi`` and ``blo <= j <= j+k <= bhi``. For all ``(i', j', k')`` meeting those
conditions, the additional conditions ``k >= k'``, ``i <= i'``, and if ``i ==
...
...
@@ -373,6 +373,9 @@ use :meth:`set_seq2` to set the commonly used sequence once and call
If no blocks match, this returns ``(alo, blo, 0)``.
.. versionchanged:: 2.6
This method returns a :term:`named tuple` ``Match(a, b, size)``.
.. method:: SequenceMatcher.get_matching_blocks()
...
...
Doc/library/doctest.rst
View file @
e3c3db59
...
...
@@ -1506,11 +1506,14 @@ DocTestRunner objects
.. method:: DocTestRunner.summarize([verbose])
Print a summary of all the test cases that have been run by this DocTestRunner,
and return a
tuple ``(failure_count, test_count
)``.
and return a
:term:`named tuple` ``TestResults(failed, attempted
)``.
The optional *verbose* argument controls how detailed the summary is. If the
verbosity is not specified, then the :class:`DocTestRunner`'s verbosity is used.
.. versionchanged:: 2.6
Use a named tuple.
.. _doctest-outputchecker:
...
...
Doc/library/inspect.rst
View file @
e3c3db59
...
...
@@ -214,6 +214,10 @@ Note:
defined in the :mod:`imp` module; see the documentation for that module for
more information on module types.
.. versionchanged:: 2.6
Returns a :term:`named tuple` ``ModuleInfo(name, suffix, mode,
module_type)``.
.. function:: getmodulename(path)
...
...
@@ -405,6 +409,10 @@ Classes and functions
default argument values or None if there are no default arguments; if this tuple
has *n* elements, they correspond to the last *n* elements listed in *args*.
.. versionchanged:: 2.6
Returns a :term:`named tuple` ``ArgSpec(args, varargs, keywords,
defaults)``.
.. function:: getargvalues(frame)
...
...
@@ -414,6 +422,10 @@ Classes and functions
names of the ``*`` and ``**`` arguments or ``None``. *locals* is the locals
dictionary of the given frame.
.. versionchanged:: 2.6
Returns a :term:`named tuple` ``ArgInfo(args, varargs, keywords,
locals)``.
.. function:: formatargspec(args[, varargs, varkw, defaults, formatarg, formatvarargs, formatvarkw, formatvalue, join])
...
...
@@ -479,6 +491,10 @@ line.
Get information about a frame or traceback object. A 5-tuple is returned, the
last five elements of the frame's frame record.
.. versionchanged:: 2.6
Returns a :term:`named tuple` ``Traceback(filename, lineno, function,
code_context, index)``.
.. function:: getouterframes(frame[, context])
...
...
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