pyDictZip: Create a dictionary

Description Usage Arguments Details Examples

View source: R/PyObjectDict.R

Description

The function pyDictZip creates a dictionary based on a list of keys and a list of values.

Usage

1
pyDictZip(keys, values, regFinalizer = TRUE)

Arguments

keys

a list giving the keys of the Python object.

values

a list giving the values of the Python object.

regFinalizer

a logical indicating if a finalizer should be be registered, the default value is TRUE.

Details

If no value is provided a virtual Python dict for an existing Python object is created. If the value is NULL, an empty virtual Python object for an empty dict is created. If the value is a named vector or named list, a new Python object based on the vector or list is created.

Examples

1
2
3
if ( pyIsConnected() ) {
pyDictZip(th.string(LETTERS[1:3]), 1:3)
}

PythonInR documentation built on May 2, 2019, 5:17 p.m.