[issue35341] Add generic version of OrderedDict to typing module

2018-12-02 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue35341] Add generic version of OrderedDict to typing module

2018-12-02 Thread miss-islington
miss-islington added the comment: New changeset 6cb0486ce861903448bd6ba1095685b6cd48e3bd by Miss Islington (bot) in branch '3.7': bpo-35341: Add generic version of OrderedDict to typing (GH-10850) https://github.com/python/cpython/commit/6cb0486ce861903448bd6ba1095685b6cd48e3bd --

[issue35341] Add generic version of OrderedDict to typing module

2018-12-02 Thread miss-islington
Change by miss-islington : -- pull_requests: +10086 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35341] Add generic version of OrderedDict to typing module

2018-12-02 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: New changeset 68b56d02ef20479b87c65e523cf3dec1b7b77d40 by Ivan Levkivskyi (Ismo Toijala) in branch 'master': bpo-35341: Add generic version of OrderedDict to typing (GH-10850) https://github.com/python/cpython/commit/68b56d02ef20479b87c65e523cf3dec1b7b77d40

[issue35341] Add generic version of OrderedDict to typing module

2018-12-02 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > Shall I open a new issue for this? @itoijala Please see https://bugs.python.org/issue33462. It's on master. -- nosy: +xtreak ___ Python tracker

[issue35341] Add generic version of OrderedDict to typing module

2018-12-02 Thread Ismo Toijala
Change by Ismo Toijala : -- keywords: +patch pull_requests: +10085 stage: -> patch review ___ Python tracker ___ ___

[issue35341] Add generic version of OrderedDict to typing module

2018-12-02 Thread Ismo Toijala
Ismo Toijala added the comment: My reason for using OrderedDict was that the normal dict is not reversible. I needed to get the last element added, so I ended up doing something like next(reversed(ordered_dict)). Perhaps this would be something to add to the normal dict (for 3.8?). Then I

[issue35341] Add generic version of OrderedDict to typing module

2018-12-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Now that regular dicts are ordered, my expectation is that OrderedDict() is going to mostly fall into disuse (much like UserDict, UserList, UserString). That said, it would be nice if all of the collections classes had generic counterparts in the typing

[issue35341] Add generic version of OrderedDict to typing module

2018-11-29 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Also typing is technically still provisional, we can backport this to previous versions (at least to 3.7). -- ___ Python tracker ___

[issue35341] Add generic version of OrderedDict to typing module

2018-11-29 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: Yes, since we already have `DefaultDict`, `Counter`, and `ChainMap` from collections, we can also add `OrderedDict`. -- ___ Python tracker

[issue35341] Add generic version of OrderedDict to typing module

2018-11-28 Thread Guido van Rossum
Guido van Rossum added the comment: Given that this is in collections, I don't object. Ivan, what do you say? -- ___ Python tracker ___

[issue35341] Add generic version of OrderedDict to typing module

2018-11-28 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +gvanrossum, levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35341] Add generic version of OrderedDict to typing module

2018-11-28 Thread Ismo Toijala
New submission from Ismo Toijala : The other collections from the collections module (namedtuple, deque, ChainMap, Counter, defaultdict) have generic versions in the typing module for use in type annotations. The problem is currently the following: from __future__ import annotations import