Include the variable name in print statements
Project description
smartprint
Save a few seconds and a few keystrokes with every print statement! 😎
- Everytime you want to print something, you lose a few seconds to type in the name of the variable being printed
- Worse still, your IDE helps you autocomplete long variable names but does not autocomplete the print comments
Your usual print statment:
print ("veryLongVariableName : ", veryLongVariableName)
Enter smart print:
from smartprint import smartprint as sprint
veryLongVariableName = 25
sprint (veryLongVariableName)
Output:
veryLongVariableName : 25
Works with multiple variables and all kinds of objects
from smartprint import smartprint as sprint
import numpy as np
a = [1,22,31]
sprint (a, len(a))
sprint (np.random.rand())
Output:
a, len(a) : [1, 22, 31] 3
np.random.rand() : 0.649617730484109
Installation
pip install smartprint
Issues
Please feel free to start a pull request/ raise an issue.
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 Distribution
smartprint-0.1.0.tar.gz
(2.8 kB
view hashes)
Built Distribution
Close
Hashes for smartprint-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b233676bcaaf22d6f26d3e20c2d7b3dc328302b0c8c3c90bcb4205054e71e1a1 |
|
MD5 | 69b9fec4dec6c6ac2bceb0a291d6bd3f |
|
BLAKE2b-256 | 111ee6fdd4ed17914af2d1167eff116a943dd0a6ce06693456c5524e6378df8a |