mirror of
https://github.com/kanaka/mal.git
synced 2024-10-27 14:52:16 +03:00
37f62250a4
Use raw or multiline string litterals to make some hard-coded strings more readable. Replace some lambda constructs with more idiomatic generator expressions, removing several temporary sequences (conversions, contatenations, slices, arguments). Replace definitions with assignments when possible. Replace most python2/3 wrappers with code compatible with both versions. Use a non-printable ASCII characters instead of Unicode characters (in order to avoid unicode in python2). core: Close file open by 'slurp' after reading. coll_Q: remove as obsolete. conj: do not preserve metadata. env: Replace find with an optional argument to get. Search in outer environments with a loop instead of a recursion. (python is not intended for large recursions). readline: Copy the example from the docs. Write the history once. mal_types: clone: copy.copy() everything except callables. functions: construct fn* functions in steps, where they are used (there was no encapsulation anyway) Derive List and Vector from tuple, which is more efficient than list for immutable structures. Remove the need for __getitem__ stuff. maps: provide an asPairs iterator. printer: Introduce a pr_list helper like many other implementations. steps: Remove obviously backported stuff from first steps. Port forward the limitation of the exception backtrace size from step5 to later steps, so that REGRESS=1 does not crash stepA tests. Fix the detection of special forms (strings were accepted as well as symbols). Let try* benefit from TCO. |
||
---|---|---|
.. | ||
tests | ||
core.py | ||
Dockerfile | ||
env.py | ||
Makefile | ||
mal_readline.py | ||
mal_types.py | ||
printer.py | ||
reader.py | ||
run | ||
step0_repl.py | ||
step1_read_print.py | ||
step2_eval.py | ||
step3_env.py | ||
step4_if_fn_do.py | ||
step5_tco.py | ||
step6_file.py | ||
step7_quote.py | ||
step8_macros.py | ||
step9_try.py | ||
stepA_mal.py |