Removals
- Python 2 is no longer supported.
- Support for attribute lists in
defclass
has been removed. Usesetv
anddefn
instead. - Literal keywords are no longer parsed differently in calls to functions with certain names.
hy.contrib.multi
has been removed. Usecond
or the PyPI packagemultipledispatch
instead.
Other Breaking Changes
HySequence
is now a subclass oftuple
instead oflist
. Thus, aHyList
will never be equal to alist
, and you can't use.append
,.pop
, etc. on aHyExpression
orHyList
.
New Features
- Added special forms
py
topys
that allow Hy programs to include inline Python code. - Added a special form
cmp
for chained comparisons. - All augmented assignment operators (except
%=
and^=
) now allow more than two arguments. - Added support for function annotations (PEP 3107) and variable annotations (PEP 526).
- Added a function
parse-args
as a wrapper for Python'sargparse
.
Bug Fixes
- Statements in the second argument of
assert
are now executed. - Fixed a bug that caused the condition of a
while
to be compiled twice. in
andnot-in
now allow more than two arguments, as in Python.hy2py
can now handle format strings.- Fixed crashes from inaccessible history files.
- Removed an accidental import from the internal Python module
test
. - Fixed a swarm of bugs in
hy.extra.anaphoric
.
Misc. Improvements
- Replaced the dependency
clint
withcolorama
.