Python Runtime Semantics in pyrt

Overview

pyrt provides the Python 3 runtime semantics required by R packages generated with pyport:

library(pyrt)

# Reference-semantics list
xs <- py_list(list(10L, 20L, 30L))
alias <- xs
xs$append(40L)
py_len(alias)
#> [1] 4

# Bit-exact CPython 3.12 random
rng <- py_random$Random(42L)
rng$random()
#> [1] 0.6394268