|
30 | 30 |
|
31 | 31 | # Short description for package list on PyPI |
32 | 32 | # |
33 | | -SHORTDESC="Missing batteries included: Python meets Lisp and Haskell." |
| 33 | +SHORTDESC="Supercharge your Python with parts of Lisp and Haskell." |
34 | 34 |
|
35 | 35 | # Long description for package homepage on PyPI |
36 | 36 | # |
|
41 | 41 | We place a special emphasis on **clear, pythonic syntax**. Design considerations |
42 | 42 | are simplicity, robustness, and minimal dependencies. |
43 | 43 |
|
44 | | -Without MacroPy, our features include tail call optimization (TCO), TCO'd loops |
45 | | -in FP style, call/ec, let & letrec, assign-once, multi-expression lambdas, |
| 44 | +**Without macros**, our features include tail call optimization (TCO), TCO'd |
| 45 | +loops in FP style, call/ec, let & letrec, assign-once, multi-expression lambdas, |
46 | 46 | dynamic assignment (a.k.a. *parameterize*, *special variables*), memoization |
47 | 47 | (also for generators and iterables), currying, function composition, |
48 | 48 | folds and scans (left and right), unfold, lazy partial unpacking of iterables, |
49 | 49 | functional update for sequences, and pythonic lispy linked lists (``cons``). |
50 | 50 |
|
51 | | -Our curry slightly modifies Python's reduction rules. It passes any extra |
52 | | -arguments through on the right, and calls a callable return value on the |
53 | | -remaining arguments, so that we can:: |
| 51 | +Our curry modifies Python's reduction rules. It passes any extra arguments |
| 52 | +through on the right, and calls a callable return value on the remaining |
| 53 | +arguments, so that we can:: |
54 | 54 |
|
55 | 55 | mymap = lambda f: curry(foldr, composerc(cons, f), nil) |
56 | 56 | myadd = lambda a, b: a + b |
|
64 | 64 | macros that essentially extend the Python language, adding features that would |
65 | 65 | be either complicated or impossible to provide (and/or use) otherwise. |
66 | 66 |
|
67 | | -Macro features include automatic currying, automatic tail-call optimization, |
| 67 | +**With macros**, we add automatic currying, automatic tail-call optimization, |
68 | 68 | continuations (``call/cc`` for Python), ``let-syntax`` (splice code at macro |
69 | 69 | expansion time), lexically scoped ``let`` and ``do`` with lean syntax, |
70 | 70 | implicit return statements, and easy-to-use multi-expression lambdas |
|
77 | 77 | The continuation system is based on a semi-automated partial conversion into |
78 | 78 | continuation-passing style (CPS), with continuations represented as closures. |
79 | 79 | It also automatically applies TCO, using the same machinery as the TCO macro. |
| 80 | +To keep the runtime overhead somewhat reasonable, the continuation is captured |
| 81 | +only where explicitly requested with ``call_cc[]``. |
80 | 82 |
|
81 | 83 | Macro examples:: |
82 | 84 |
|
|
0 commit comments