[docs] [issue33860] doc Avoid "ordered dictionary" references now that dictionaries are ordered
report at bugs.python.org
Thu Jun 14 13:28:53 EDT 2018
Andrés Delfino <adelfino at 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 <report at bugs.python.org>
More information about the docs