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.3.tar.gz
(1.7 kB
view details)
Built Distribution
File details
Details for the file pystrin-0.0.3.tar.gz
.
File metadata
- Download URL: pystrin-0.0.3.tar.gz
- Upload date:
- Size: 1.7 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 |
0701535c8334de7d3980f0c64d134c176f3f8905c918cd447ce5ba1d52b589c7
|
|
MD5 |
1f5ff3d2c9143e2fc935c2784e15f7db
|
|
BLAKE2b-256 |
8143c0ff66031ebe0fe41bba6c34a0c7851fa94d06dbfee7484dacc7ff627314
|
File details
Details for the file pystrin-0.0.3-py3-none-any.whl
.
File metadata
- Download URL: pystrin-0.0.3-py3-none-any.whl
- Upload date:
- Size: 3.6 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 |
630bb5e1d37b225af36379085d3689336f7ee03b3b042ddb3b11ef3c7a40f130
|
|
MD5 |
d37166d1fb39a368cfb2f3cdd6c210a0
|
|
BLAKE2b-256 |
cf1fd7f933827b83445d33937841e491bc39c163b3de303dad207e20912576f4
|