[issue36321] Fix misspelled attribute name in namedtuple()

2019-10-20 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 58ccd201fa74287ca9293c03136fcf1e19800ef9 by Raymond Hettinger in 
branch 'master':
bpo-36321: Fix misspelled attribute name in namedtuple() (GH-16858)
https://github.com/python/cpython/commit/58ccd201fa74287ca9293c03136fcf1e19800ef9


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36321] Fix misspelled attribute name in namedtuple()

2019-10-19 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +16405
pull_request: https://github.com/python/cpython/pull/16858

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36321] Fix misspelled attribute name in namedtuple()

2019-03-18 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36321] Fix misspelled attribute name in namedtuple()

2019-03-18 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset bedfbc790e18f14cfdd59cf27d27bb86518dc3fc by Raymond Hettinger 
(Miss Islington (bot)) in branch '3.7':
bpo-36321: Fix misspelled attribute in namedtuple() (GH-12375) (GH-12395)
https://github.com/python/cpython/commit/bedfbc790e18f14cfdd59cf27d27bb86518dc3fc


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36321] Fix misspelled attribute name in namedtuple()

2019-03-18 Thread miss-islington


Change by miss-islington :


--
pull_requests: +12350

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36321] Fix misspelled attribute name in namedtuple()

2019-03-18 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 23581c018fceb607fe829a41c6fbe81b4d502cab by Raymond Hettinger in 
branch 'master':
bpo-36321: Fix misspelled attribute in namedtuple() (GH-12375)
https://github.com/python/cpython/commit/23581c018fceb607fe829a41c6fbe81b4d502cab


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36321] Fix misspelled attribute name in namedtuple()

2019-03-16 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
keywords: +patch
pull_requests: +12335
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36321] Fix misspelled attribute name in namedtuple()

2019-03-16 Thread Raymond Hettinger


New submission from Raymond Hettinger :

The attribute name, '_fields_defaults' was misspelled and should have been 
''_field_defaults'.  The namedtuple documentation uses both spellings.  The 
typing.NamedTuple class consistently uses the latter spelling.  The intent was 
the both would be spelled the same way.

>>> from typing import NamedTuple
>>> class Employee(NamedTuple):
name: str
id: int = 3
>>> Employee._field_defaults
{'id': 3}

>>> from collections import namedtuple
>>> Employee = namedtuple('Employee', ['name', 'id'], defaults=[3])
>>> Employee._fields_defaults
{'id': 3}

Since 3.7 API is already released, it may be reasonable to provide both 
spellings for namedtuple().

--
assignee: rhettinger
components: Library (Lib)
messages: 338096
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Fix misspelled attribute name in namedtuple()
type: behavior
versions: Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com