[issue37809] Alias typing.NamedTuple to collections

2019-08-10 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Further notes for posterity:

* Anything written using collections.NamedTuple would instantly lose its 
backwards compatibility.  

* The casing of NamedTuple is more in line with the typing module:  List, 
Deque, NamedTuple and doesn't fit well with the deque, namedtuple, and ChainMap 
in the collections module. 

* Nothing in the collections module currently requires typing, but NamedTuple 
can only be used with typing.  

* We really don't want to increase import times for collections. This proposal 
would defeat the entire purpose of having moved _collections_abc to a separate 
module outside of the collections package.

--

___
Python tracker 

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



[issue37809] Alias typing.NamedTuple to collections

2019-08-10 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

> FWIW, I had updated the docs for namedtuple() to link to typing.NamedTuple.  
> I think that should suffice.

Thank you!  I looked at the docs everything looks good.  I think this can be 
closed now.

--
assignee:  -> docs@python
components: +Documentation
nosy: +docs@python
resolution:  -> fixed
stage:  -> 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



[issue37809] Alias typing.NamedTuple to collections

2019-08-10 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> we should do a better job of advertising typing.NamedTuple

FWIW, I had updated the docs for namedtuple() to link to typing.NamedTuple.  I 
think that should suffice.

--
nosy: +rhettinger

___
Python tracker 

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



[issue37809] Alias typing.NamedTuple to collections

2019-08-10 Thread Steven D'Aprano


New submission from Steven D'Aprano :

As discussed in the thread starting here with Guido's message:

https://mail.python.org/archives/list/python-id...@python.org/message/WTBXYJJ7CSGDLLJHHPHSH5ZCCA4C7QEP/

and these two follow-ups:

https://mail.python.org/archives/list/python-id...@python.org/message/SXF3RKYQ6DXFKX2RFMUDUKAWQEGXGHP3/

https://mail.python.org/archives/list/python-id...@python.org/message/VRCH56CHE4P7IAWO7QRA6TDBISLONGQT/


we should do a better job of advertising typing.NamedTuple by aliasing it in 
the collections module.

(I'm not sure if this can still go into 3.8, since it's not really a new 
feature, or if its too late.)

--
messages: 349339
nosy: gvanrossum, levkivskyi, steven.daprano
priority: normal
severity: normal
status: open
title: Alias typing.NamedTuple to collections
versions: Python 3.8, Python 3.9

___
Python tracker 

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