Removals
- Empty expressions (
()
) are no longer legal at the top level.
New Features
eval
/hy_eval
andhy_compile
now accept an optionalcompiler
argument that enables the use of an existingHyASTCompiler
instance.- Keyword objects (not just literal keywords) can be called, as shorthand for
(get obj :key)
, and they accept a default value as a second argument. - Minimal macro expansion namespacing has been implemented. As a result, external macros no longer have to
require
their own macro dependencies. - Macros and tags now reside in module-level
__macros__
and__tags__
attributes.
Bug Fixes
- Cleaned up syntax and compiler errors.
- You can now call
defmain
with an empty lambda list. require
now compiles to Python AST.- Fixed circular
require
\s. - Fixed module reloading.
- Fixed circular imports.
- Fixed errors from
from __future__ import ...
statements and missing Hy module docstrings caused by automatic importing of Hy builtins. - Fixed
__main__
file execution. - Fixed bugs in the handling of unpacking forms in method calls and attribute access.
- Fixed crashes on Windows when calling
hy-repr
on date and time objects. - Fixed a crash in
mangle
for some pathological inputs. - Fixed incorrect mangling of some characters at low code points.
- Fixed a crash on certain versions of Python 2 due to changes in the standard module
tokenize
.