Skip to main content

Contextual Value Shifter, a module for shifting values to different destinations.

Project description

Contextual Value Shifter is a Python module that implements a contextual “shift” function.

Usage

from cxvshifter import shift

# Shifting to variables
x = 5
shift(10, 'x')
print(x)
# => 10

# Shifting to a file
shift("hello", 'file', "hello.txt")

# Shifting to stdout
shift("Hello, shifting world!", 'stdout')

# Shifting to return
shift(24, 'return')
# -> 24

Improper usage

x = 5
shift(10, x)
# Will attempt to shift to a variable named 5
# In ctxvalue-shifter, this will result in a TypeError

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

ctxvalue_shifter-1.2.1-py3-none-any.whl (16.0 kB view hashes)

Uploaded Python 3

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