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
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Close
Hashes for ctxvalue_shifter-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f891eec2373a22a47d0ed407fd9945e12fbd6ce0ce8494bbead80a3ce4e12905 |
|
MD5 | 9833ef9bfbcc3486a4470486f066d810 |
|
BLAKE2b-256 | 943dbd025af25cb4388bb6a8367b9b1797a853822acecd66cc8ccd88c437141e |