Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
smacke committed Jan 24, 2022
1 parent 8ddbc76 commit 48c0f55
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ History
0.0.8 (2022-01-23)
------------------
* Add eval helper;
* Add syntactic macro examples;
* Add syntactic macro examples (quasiquotes and quick lambdas);
* Add support for conditional handlers;

0.0.7 (2022-01-06)
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ source code (as opposed to bytecode-level instrumentation).
Pyccolo can be used (and has been used) to implement various kinds of dynamic analysis
tools and other instrumentation:
- Code coverage (see [pyccolo/examples/coverage.py](https://github.com/smacke/pyccolo/blob/master/pyccolo/examples/coverage.py))
- Syntactic macros such as quasiquotes (like [MacroPy's](https://macropy3.readthedocs.io/en/latest/reference.html#quasiquote); see [pyccolo/examples/quasiquote.py)](https://github.com/smacke/pyccolo/blob/master/pyccolo/examples/quasiquote.py))
- Syntactic macros such as quasiquotes (like [MacroPy's](https://macropy3.readthedocs.io/en/latest/reference.html#quasiquote) or quick lambdas; see [pyccolo/examples/quasiquote.py)](https://github.com/smacke/pyccolo/blob/master/pyccolo/examples/quasiquote.py) and [pyccolo/examples/quick_lambda.py)](https://github.com/smacke/pyccolo/blob/master/pyccolo/examples/quick_lambda.py))
- Syntax-augmented Python (3.8 and up, see [pyccolo/examples/null_coalesce.py](https://github.com/smacke/pyccolo/blob/master/pyccolo/examples/null_coalesce.py))
- Dynamic dataflow analysis performed by [nbsafety](https://github.com/nbsafety-project/nbsafety)
- Tools to find unused imports at runtime (candidates for lazy importing)
Expand Down
10 changes: 10 additions & 0 deletions pyccolo/examples/quick_lambda.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,14 @@
# -*- coding: utf-8 -*-
"""
Implementation of quick lambdas in Pyccolo, similar to MacroPy's.
Ref: https://macropy3.readthedocs.io/en/latest/quick_lambda.html#quicklambda
Example:
```
with QuickLambdaTracer.instance():
assert pyc.eval("f[_ + _](3, 4)") == 7
```
"""
import ast
import copy

Expand Down

0 comments on commit 48c0f55

Please sign in to comment.