Skip to main content

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


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)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page