On Jan 30, 2019, at 14:32, Raymond Hettinger <raymond.hettin...@gmail.com> 
wrote:
> 
> Now that regular dicts are ordered and compact, it makes more sense for the 
> _asdict() method to create a regular dict (as it did in its early days) 
> rather than an OrderedDict.  The regular dict is much smaller, much faster, 
> and has a much cleaner looking repr.  It would also help namedtuple() stay in 
> sync with dataclasses which already take advantage of the ordering feature of 
> regular dicts.

Thanks for the excellent write up, Raymond.

> Option 1) Add a deprecation notice to 3.8 […]

In general, I don’t favor deprecation notices for things that are not 
actionable by the end user or the consumer of the API in question.  It ends up 
being just noise, and that’s one of the big reasons why they are silenced by 
default (i.e. the end user of a Python application can’t do anything about the 
deprecation, so why scare them?).

Maybe we need something like a MinorBehavioralChangeWarning which would be 
surfaced similar to PendingDeprecationWarning, but which says “Hey, we changed 
this in the current version of Python.  Be aware of that change, but you 
probably don’t need to do anything about it”.  At least such warnings could be 
reviewed, documented, and audited.

I suppose in this case, there is something the consumer of the API can do (as 
you point out, they can wrap their code), but in all likelihood there’s really 
nothing they *need* to do.  I think it will be rare that a Python 3.8 user will 
get bitten by this.  Therefore...

> Option 4) Just make the change directly in 3.8,

JFDI!

-Barry

Attachment: signature.asc
Description: Message signed with OpenPGP

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to