Re: [Python-Dev] Check dict implementation details

2016-10-09 Thread Franklin? Lee
On Sat, Oct 8, 2016 at 6:01 AM, Serhiy Storchaka wrote: > Since dict is ordered in CPython 3.6, it can be used instead of OrderedDict > in some places (e.g. for implementing simple limited caches). But since this > is implementation detail, it can't be used in the stdlib unconditionally. > Needed

Re: [Python-Dev] Check dict implementation details

2016-10-08 Thread Nick Coghlan
On 8 October 2016 at 20:01, Serhiy Storchaka wrote: > Since dict is ordered in CPython 3.6, it can be used instead of OrderedDict > in some places (e.g. for implementing simple limited caches). But since this > is implementation detail, it can't be used in the stdlib unconditionally. > Needed a wa

Re: [Python-Dev] Check dict implementation details

2016-10-08 Thread Raymond Hettinger
> On Oct 8, 2016, at 3:01 AM, Serhiy Storchaka wrote: > > Since dict is ordered in CPython 3.6, it can be used instead of OrderedDict > in some places (e.g. for implementing simple limited caches). But since this > is implementation detail, it can't be used in the stdlib unconditionally. > Ne

[Python-Dev] Check dict implementation details

2016-10-08 Thread Serhiy Storchaka
Since dict is ordered in CPython 3.6, it can be used instead of OrderedDict in some places (e.g. for implementing simple limited caches). But since this is implementation detail, it can't be used in the stdlib unconditionally. Needed a way to check whether dict is ordered. Actually there are t