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.1.tar.gz
(2.9 kB
view hashes)
Built Distribution
Close
Hashes for smartprint-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 662de6961984aa5dbb1691b898f177ddd555d27df2ea1a1397d520378d12c392 |
|
MD5 | b3ea023b97474d09ccbfccf32305284a |
|
BLAKE2b-256 | 44b4f58347fa4b13b6a30852c44e7e1a0e6230da1436108c6fd2ed36676ede62 |