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.5.tar.gz
(1.8 kB
view details)
Built Distribution
File details
Details for the file pystrin-0.0.5.tar.gz
.
File metadata
- Download URL: pystrin-0.0.5.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 |
0fc33a6acab4c426d999ed21d7f18c31e95de7aaf52653b880490e377265e625
|
|
MD5 |
ca8babecb97401e9f842bfe9df35bdbc
|
|
BLAKE2b-256 |
dbc84e676979c7cd40bdcd4fa9eadaaeedd705e887313a114bb170f59c2db539
|
File details
Details for the file pystrin-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: pystrin-0.0.5-py3-none-any.whl
- Upload date:
- Size: 3.7 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 |
3deee10107c72b04a573c637209adb016924b7e807ffebc88cead50c973c1d63
|
|
MD5 |
b24c371c9c8866a68602bb7fc1ba6ffb
|
|
BLAKE2b-256 |
f33fd17559cf2653cc523fc83987333b89686264349817cb283b351c4acca2be
|