A small Python package used for string interpolation
Project description
# pystrin
A small Python library for string interpolation.
### Usage
Use the `f` method on a string with a literal for string interpolation. Use `printf` instead to directly print the result. An example is:
```
name = 'campoe'
printf('Hello {name}')
# --- Output ---
# Hello campoe
```
In fact, it can be used with any expression:
```
x = 3
printf('5 * {x} = {5 * x}')
# --- Output ---
# 5 * 3 = 15
```
A small Python library for string interpolation.
### Usage
Use the `f` method on a string with a literal for string interpolation. Use `printf` instead to directly print the result. An example is:
```
name = 'campoe'
printf('Hello {name}')
# --- Output ---
# Hello campoe
```
In fact, it can be used with any expression:
```
x = 3
printf('5 * {x} = {5 * x}')
# --- Output ---
# 5 * 3 = 15
```
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
pystrin-0.0.6.tar.gz
(1.8 kB
view details)
Built Distribution
File details
Details for the file pystrin-0.0.6.tar.gz
.
File metadata
- Download URL: pystrin-0.0.6.tar.gz
- Upload date:
- Size: 1.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
433571cd5561387a6c190029c3c4a8985f14cb6d59edf9de090d2c132adf6c1d
|
|
MD5 |
1f7c8248bd1105cec8f3dcb9cd6b5421
|
|
BLAKE2b-256 |
8cdd40b2f606af7a9788adda076c30c1d3fc85950883bf61ea11ccfab8825e38
|
File details
Details for the file pystrin-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: pystrin-0.0.6-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
6977220dd27b674fec797f6d0d5040b16d93f57fa95532704f70a29826a6a5d5
|
|
MD5 |
30005c05d848eeb0e0533382ffa3342a
|
|
BLAKE2b-256 |
cba96defbcbf323195550467dd1457ece51d565bf4b6eeb1463ed087aac5b448
|