Python3.5 (vi) dictionary

Source: Internet
Author: User
Tags iterable shallow copy

classDict (object):"""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 Iterabl E: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)"""    defClear (self):#real signature unknown; restored from __doc__        """Clear Content"""        """d.clear (), None. Remove all items from D."""        Pass    defCopy (self):#real signature unknown; restored from __doc__        """Shallow Copy"""        """d.copy (), a shallow copy of D"""        Pass@staticmethod#known case    defFromkeys (S, V=none):#real signature unknown; restored from __doc__        """Dict.fromkeys (S[,v]), New dict with keys from S and values equal to V.        V defaults to None. """        Pass    defGet (self, k, d=none):#real signature unknown; restored from __doc__        """gets the value according to key, D is the default value"""        """D.get (K[,d]), D[k] if k in D, else D. D defaults to None. """        Pass    defHas_key (self, k):#real signature unknown; restored from __doc__        """whether there is a key"""        """D.has_key (k)-True if D has a key k, else False"""        returnFalsedefItems (self):#real signature unknown; restored from __doc__        """list form for all items"""        """d.items (), List of D ' s (key, value) pairs, as 2-tuples"""        return []    defIteritems (self):#real signature unknown; restored from __doc__        """items can be iterated"""        """D.iteritems () a iterator over the (key, value) items of D"""        Pass    defIterkeys (self):#real signature unknown; restored from __doc__        """Key can iterate"""        """D.iterkeys () a iterator over the keys of D"""        Pass    defItervalues (self):#real signature unknown; restored from __doc__        """value can iterate"""        """d.itervalues () a iterator over the values of D"""        Pass    defKeys (self):#real signature unknown; restored from __doc__        """List of all keys"""        """D.keys (), List of D ' s keys"""        return []    defPop (self, k, d=none):#real signature unknown; restored from __doc__        """gets and removes from the dictionary"""        """D.pop (K[,d])-V, remove specified key and return the corresponding value. If key is no found, D is returned if given, otherwise keyerror is raised"""        Pass    defPopitem (self):#real signature unknown; restored from __doc__        """gets and removes from the dictionary"""        """D.popitem (), (k, v), remove and return some (key, value) pair as a 2-tuple; but raise keyerror if        D is empty. """        Pass    defSetDefault (self, k, d=none):#real signature unknown; restored from __doc__        """If key does not exist, it is created, if present, returns the existing value and does not modify"""        """D.setdefault (K[,d]), D.get (K,d), also set D[k]=d if K not in D"""        Pass    defUpdate (self, E=none, **f):#known special case of Dict.update        """Update {' name ': ' Alex ', ' Age ': 18000} [(' Name ', ' SBSBSB '),]"""        """d.update ([E,]**f), None.        Update D from Dict/iterable E and F. If e present and has A. Keys () method, Does:for k in e:d[k] = e[k] If e present and lacks. Keys () method, Doe S:for (k, v) in e:d[k] = V In either case, the is followed By:for k in f:d[k] = F[k]"""        Pass    defVALUES (self):#real signature unknown; restored from __doc__        """all the values"""        """d.values (), List of D ' s values"""        return []    defViewitems (self):#real signature unknown; restored from __doc__        """all items, just save the content to the View object"""        """D.viewitems () a Set-like object providing a view on D ' s items"""        Pass    defViewkeys (self):#real signature unknown; restored from __doc__        """D.viewkeys () a Set-like object providing a view on D ' s keys"""        Pass    defViewvalues (self):#real signature unknown; restored from __doc__        """d.viewvalues () A object providing a view on D ' s values"""        Pass    def __cmp__(Self, y):#real signature unknown; restored from __doc__        """x.__cmp__ (y) <==> cmp (x, y)"""        Pass    def __contains__(self, k):#real signature unknown; restored from __doc__        """d.__contains__ (k)-True if D has a key k, else False"""        returnFalsedef __delitem__(Self, y):#real signature unknown; restored from __doc__        """x.__delitem__ (y) <==> del X[y]"""        Pass    def __eq__(Self, y):#real signature unknown; restored from __doc__        """x.__eq__ (y) <==> x==y"""        Pass    def __getattribute__(self, name):#real signature unknown; restored from __doc__        """x.__getattribute__ (' name ') <==> x.name"""        Pass    def __getitem__(Self, y):#real signature unknown; restored from __doc__        """x.__getitem__ (y) <==> X[y]"""        Pass    def __ge__(Self, y):#real signature unknown; restored from __doc__        """x.__ge__ (y) <==> x>=y"""        Pass    def __gt__(Self, y):#real signature unknown; restored from __doc__        """x.__gt__ (y) <==> x>y"""        Pass    def __init__(Self, Seq=none, **kwargs):#known special case of dict.__init__        """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=va  Lue pairs in the keyword argument list. For Example:dict (one=1, two=2) # (copied from class Doc)"""        Pass    def __iter__(self):#real signature unknown; restored from __doc__        """x.__iter__ () <==> iter (x)"""        Pass    def __len__(self):#real signature unknown; restored from __doc__        """x.__len__ () <==> len (x)"""        Pass    def __le__(Self, y):#real signature unknown; restored from __doc__        """x.__le__ (y) <==> x<=y"""        Pass    def __lt__(Self, y):#real signature unknown; restored from __doc__        """x.__lt__ (y) <==> x<y"""        Pass@staticmethod#known case of __new__    def __new__(S, *more):#real signature unknown; restored from __doc__        """t.__new__ (S, ...)-A new object with type S, a subtype of T"""        Pass    def __ne__(Self, y):#real signature unknown; restored from __doc__        """x.__ne__ (y) <==> x!=y"""        Pass    def __repr__(self):#real signature unknown; restored from __doc__        """x.__repr__ () <==> repr (x)"""        Pass    def __setitem__(Self, I, y):#real signature unknown; restored from __doc__        """x.__setitem__ (i, y) <==> x[i]=y"""        Pass    def __sizeof__(self):#real signature unknown; restored from __doc__        """d.__sizeof__ (), size of D in memory, in bytes"""        Pass    __hash__=nonedict

Python3.5 (vi) dictionary

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.