A collection of my random dev tools and scripts.
Project description
What2
A collection of my random dev tools and scripts.
dbg
function
>>> from what2.debug import dbg
>>> a = ["hello", "world"]
>>> dbg(
... a,
... "foo",
... )
a: ['hello', 'world']
"foo": foo
>>> from what2.debug import dbg
>>> dbg(3+4)
3+4: 7
>>> a = ["hello", "world"]
>>> dbg(a)
a: ['hello', 'world']
>>> @dbg()
... def foo(arg: int) -> str:
... return str(arg)
>>> _ = foo(4)
foo called with args: (4,) and kwargs: {}
foo, result: 4
>>> with dbg(enabled=False):
... _ = foo(4)
>>> with dbg(with_type=True):
... dbg(5)
... dbg(a)
5, <class 'int'>: 5
a, <class 'list'>: ['hello', 'world']
>>> with dbg(with_id=True):
... dbg(a)
a, id[...]: ['hello', 'world']
>>> dbg(a, "foo")
a: ['hello', 'world']
"foo": foo
>>> dbg(
... a,
... "foo",
... )
a: ['hello', 'world']
"foo": foo
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
what2-0.4.2.tar.gz
(9.3 kB
view details)
Built Distribution
what2-0.4.2-py3-none-any.whl
(8.6 kB
view details)
File details
Details for the file what2-0.4.2.tar.gz
.
File metadata
- Download URL: what2-0.4.2.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.24.2 CPython/3.13.0 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
9dbc01baa8596c06443d79944cbd684975900a1948992c4d33df4a8b173ff9a4
|
|
MD5 |
e4a2cfd7022421ed9ba35f72b75f94f3
|
|
BLAKE2b-256 |
9c1412eeb1c33f4ed5eff05983e18a205aec6e0ffc84d9eeb36ef13346457703
|
File details
Details for the file what2-0.4.2-py3-none-any.whl
.
File metadata
- Download URL: what2-0.4.2-py3-none-any.whl
- Upload date:
- Size: 8.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: pdm/2.24.2 CPython/3.13.0 Linux/5.15.153.1-microsoft-standard-WSL2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
4cfd5f92d1db7b2c00f1491923804921fc9490d169191ee78ce7a8629428ba7a
|
|
MD5 |
6b8f46c7552f09649b0e45e2f98023b3
|
|
BLAKE2b-256 |
de59bebfa9e569aad21b5cc650b0e80c63165e36b4951bf99dea2ab8b958e752
|