Andrés Delfino <adelf...@gmail.com> added the comment:

Please note that DictReader already mentions "OrderedDict" as a type it returns 
now. I do see the issue you raise though and I'm not proposing to guarantee 
that type for next versions.

I see the benefits of using weak names, but "dictionary" alone doesn't seem 
like a good weak name to me, as it's the common name of an actual type. 
"ordered dictionary" is the common name of a type, too, which makes the 
"dictionary" in that phrase less of a weak name. Bacause of this, I don't think 
we are using weak names in the cases the PR changes.

A dict-like object must preserve insertion order as that's what dict does; 
specifying it could make people think dicts aren't ordered. I understand a 
dict-like object as if it were a dict subclass, that is, following the full 
dict API.

As to what the changes could look like with these things in mind... It's 
difficult to say without knowing which API are we actually telling people to 
rely on now: dict, dict-like, OrderedDict, OrderedDict-like?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33860>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to