Spade
Mini Shell
| Directory:~$ /proc/self/root/usr/lib/python2.7/site-packages/future/types/ |
| [Home] [System Details] [Kill Me] |
�
,�]c@s�dZddlZddlmZddlmZeZejd Z de
fd��YZdeee�fd ��YZdgZ
dS(
s�
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)
i����N(twith_metaclass(t newobjectitBaseNewDictcBseZd�ZRS(cCs-|tkrt|t�St|j|�SdS(N(tnewdictt
isinstancet
_builtin_dictt
issubclasst __class__(tclstinstance((s8/usr/lib/python2.7/site-packages/future/types/newdict.pyt__instancecheck__s
(t__name__t
__module__R
(((s8/usr/lib/python2.7/site-packages/future/types/newdict.pyRsRcBs;eZdZd�Zd�Zd�Zd�Zd�ZRS(s7
A backport of the Python 3 dict object to Py2
cCsFtdkr|j�Stdkr,|j�Std krB|j�SdS(
s�
On Python 2.7+:
D.items() -> a set-like object providing a view on D's
items
On Python 2.6:
D.items() -> an iterator over D's items
iiiiiN(ii(ii(ii(tvert viewitemst iteritemstitems(tself((s8/usr/lib/python2.7/site-packages/future/types/newdict.pyR)s
cCsFtdkr|j�Stdkr,|j�Std krB|j�SdS(
s�
On Python 2.7+:
D.keys() -> a set-like object providing a view on D's
keys
On Python 2.6:
D.keys() -> an iterator over D's keys
iiiiiN(ii(ii(ii(R
tviewkeystiterkeystkeys(R((s8/usr/lib/python2.7/site-packages/future/types/newdict.pyR7s
cCsFtdkr|j�Stdkr,|j�Std krB|j�SdS(
s�
On Python 2.7+:
D.values() -> a set-like object providing a view on D's
values
On Python 2.6:
D.values() -> an iterator over D's values
iiiiiN(ii(ii(ii(R
t
viewvaluest
itervaluestvalues(R((s8/usr/lib/python2.7/site-packages/future/types/newdict.pyREs
cOsnt|�dkr(tt|�j|�St|d�tkrK|d}n
|d}tt|�j||�S(s�
dict() -> new empty dictionary
dict(mapping) -> new dictionary initialized from a mapping
object's
(key, value) pairs
dict(iterable) -> new dictionary initialized as if via:
d = {}
for k, v in iterable:
d[k] = v
dict(**kwargs) -> new dictionary initialized with the name=value
pairs
in the keyword argument list. For example: dict(one=1, two=2)
i(tlentsuperRt__new__ttype(Rtargstkwargstvalue((s8/usr/lib/python2.7/site-packages/future/types/newdict.pyRSs
cCs
t|�S(s=
Hook for the future.utils.native() function
(tdict(R((s8/usr/lib/python2.7/site-packages/future/types/newdict.pyt
__native__hs(RRt__doc__RRRRR
(((s8/usr/lib/python2.7/site-packages/future/types/newdict.pyR%s (R!tsystfuture.utilsRtfuture.types.newobjectRRRtversion_infoR
RRRt__all__(((s8/usr/lib/python2.7/site-packages/future/types/newdict.pyt<module>s
J