dict_Python-class: Proxy Class for Python Dictionaries

Description Methods

Description

This class is a proxy for ordinary dictionary objects in Python. All the standard Python methods for such objects (e.g., keys()) are available, but methods for R functions are not implemented.

Methods

clear(..., .ev = XRPython::RPython(), .get = NA)

Python Method: clear() D.clear() -> None. Remove all items from D.

fromkeys(..., .ev = XRPython::RPython(), .get = NA)

Python Method: fromkeys() dict.fromkeys(S[,v]) -> New dict with keys from S and values equal to v. v defaults to None.

get(..., .ev = XRPython::RPython(), .get = NA)

Python Method: get() D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.

has_key(..., .ev = XRPython::RPython(), .get = NA)

Python Method: has_key() D.has_key(k) -> True if D has a key k, else False

items(..., .ev = XRPython::RPython(), .get = NA)

Python Method: items() D.items() -> list of D's (key, value) pairs, as 2-tuples

iteritems(..., .ev = XRPython::RPython(), .get = NA)

Python Method: iteritems() D.iteritems() -> an iterator over the (key, value) items of D

iterkeys(..., .ev = XRPython::RPython(), .get = NA)

Python Method: iterkeys() D.iterkeys() -> an iterator over the keys of D

itervalues(..., .ev = XRPython::RPython(), .get = NA)

Python Method: itervalues() D.itervalues() -> an iterator over the values of D

keys(..., .ev = XRPython::RPython(), .get = NA)

Python Method: keys() D.keys() -> list of D's keys

pop(..., .ev = XRPython::RPython(), .get = NA)

Python Method: pop() D.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised

popitem(..., .ev = XRPython::RPython(), .get = NA)

Python Method: popitem() D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.

setdefault(..., .ev = XRPython::RPython(), .get = NA)

Python Method: setdefault() D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D

update(..., .ev = XRPython::RPython(), .get = NA)

Python Method: update() 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, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values(..., .ev = XRPython::RPython(), .get = NA)

Python Method: values() D.values() -> list of D's values

viewitems(..., .ev = XRPython::RPython(), .get = NA)

Python Method: viewitems() D.viewitems() -> a set-like object providing a view on D's items

viewkeys(..., .ev = XRPython::RPython(), .get = NA)

Python Method: viewkeys() D.viewkeys() -> a set-like object providing a view on D's keys

viewvalues(..., .ev = XRPython::RPython(), .get = NA)

Python Method: viewvalues() D.viewvalues() -> an object providing a view on D's values


XRPython documentation built on Nov. 17, 2017, 7:09 a.m.