← Back
Editing: newdict.cpython-38.pyc
U ,�] � @ sf d Z ddlZddlmZ ddlmZ eZejdd� Z G dd� de �ZG dd � d eee��Zd gZ dS ) a� A dict subclass for Python 2 that behaves like Python 3's dict Example use: >>> from builtins import dict >>> d1 = dict() # instead of {} for an empty dict >>> d2 = dict(key1='value1', key2='value2') The keys, values and items methods now return iterators on Python 2.x (with set-like behaviour on Python 2.7). >>> for d in (d1, d2): ... assert not isinstance(d.keys(), list) ... assert not isinstance(d.values(), list) ... assert not isinstance(d.items(), list) � N)�with_metaclass)� newobject� c @ s e Zd Zdd� ZdS )�BaseNewDictc C s"