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
3099ae40
Commit
3099ae40
authored
May 20, 2019
by
Andre Delfino
Committed by
Cheryl Sabella
May 20, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove workaround for defaults in namedtuple now that we have the defaults parameter (GH-13263)
parent
6220c02e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
9 deletions
+0
-9
Doc/library/collections.rst
Doc/library/collections.rst
+0
-9
No files found.
Doc/library/collections.rst
View file @
3099ae40
...
...
@@ -1017,15 +1017,6 @@ fields:
.. versionchanged:: 3.5
Property docstrings became writeable.
Default values can be implemented by using :meth:`~somenamedtuple._replace` to
customize a prototype instance:
>>> Account = namedtuple('Account', 'owner balance transaction_count')
>>> default_account = Account('<owner name>', 0.0, 0)
>>> johns_account = default_account._replace(owner='John')
>>> janes_account = default_account._replace(owner='Jane')
.. seealso::
* See :class:`typing.NamedTuple` for a way to add type hints for named
...
...
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