Referencable objects for Python.
Project description
Referencable objects in Python.
from ref_type import ref
ref1: ref[int] = ref(1)
ref2: ref[int] = ref(1)
def add(r1: ref[int], r2: ref[int]) -> None:
r1 += r2
add(ref1, ref2)
print(ref1) # => 2
Use .get() to get value, .ilshift(X) to do LeftShiftEquals.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ref_type-1.0.0.tar.gz
(3.0 kB
view hashes)