pycodeit-tracer 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
pycodeit_tracer/init.py
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# pycodeit_tracer/__init__.py
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
pycodeit-tracer: A lightweight Python code execution trace helper.
|
|
5
|
+
Practice more interactive tracing challenges at https://www.pycodeit.com
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
def trace_steps(func):
|
|
9
|
+
"""
|
|
10
|
+
Decorator that prints each return value and call info.
|
|
11
|
+
Useful for manually verifying trace table results.
|
|
12
|
+
"""
|
|
13
|
+
import functools
|
|
14
|
+
@functools.wraps(func)
|
|
15
|
+
def wrapper(*args, **kwargs):
|
|
16
|
+
print(f"[trace] Calling {func.__name__} with args={args}")
|
|
17
|
+
result = func(*args, **kwargs)
|
|
18
|
+
print(f"[trace] {func.__name__} returned: {result}")
|
|
19
|
+
return result
|
|
20
|
+
return wrapper
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pycodeit-tracer
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: A Python code execution trace helper for interview preparation
|
|
5
|
+
License: MIT
|
|
6
|
+
Project-URL: Homepage, https://www.pycodeit.com
|
|
7
|
+
Project-URL: Practice Platform, https://www.pycodeit.com
|
|
8
|
+
Project-URL: Source Code, https://github.com/RichieDatalyst/python-code-tracing-resources
|
|
9
|
+
Project-URL: Bug Tracker, https://github.com/RichieDatalyst/python-code-tracing-resources/issues
|
|
10
|
+
Keywords: python,code-tracing,dry-run,interview-prep,output-prediction,debugging
|
|
11
|
+
Classifier: Programming Language :: Python :: 3
|
|
12
|
+
Classifier: Topic :: Education
|
|
13
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
License-File: LICENSE
|
|
16
|
+
Dynamic: license-file
|
|
17
|
+
|
|
18
|
+
# pycodeit-tracer
|
|
19
|
+
|
|
20
|
+
A lightweight Python code execution trace decorator for developers
|
|
21
|
+
practicing dry-run output prediction and interview preparation.
|
|
22
|
+
|
|
23
|
+
## Install
|
|
24
|
+
pip install pycodeit-tracer
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
from pycodeit_tracer import trace_steps
|
|
28
|
+
|
|
29
|
+
@trace_steps
|
|
30
|
+
def add(a, b):
|
|
31
|
+
return a + b
|
|
32
|
+
|
|
33
|
+
add(3, 4)
|
|
34
|
+
# [trace] Calling add with args=(3, 4)
|
|
35
|
+
# [trace] add returned: 7
|
|
36
|
+
|
|
37
|
+
## Practice More
|
|
38
|
+
Practice unlimited interactive tracing challenges at
|
|
39
|
+
**[PyCodeIt](https://www.pycodeit.com)** It is free, no install required.
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
pycodeit_tracer/init.py,sha256=9cpxtriagO4ejxZXqB3PCDuY1kae9X16sX-dDC0UGy0,641
|
|
2
|
+
pycodeit_tracer-1.0.0.dist-info/licenses/LICENSE,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
+
pycodeit_tracer-1.0.0.dist-info/METADATA,sha256=rvqsQPW8Vz7GVqJfRoNjF8THVT49JCDEmjONGphTsZg,1282
|
|
4
|
+
pycodeit_tracer-1.0.0.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
5
|
+
pycodeit_tracer-1.0.0.dist-info/top_level.txt,sha256=MgDp6_IkpvAiQJjCONSHQyO9eK3CiiVcPHrlFESP_QM,16
|
|
6
|
+
pycodeit_tracer-1.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
pycodeit_tracer
|