Update NEWS and documentation

This commit is contained in:
Kodi Arfer 2019-08-18 09:45:40 -04:00
parent 7aaece3725
commit e5461f171c
2 changed files with 10 additions and 5 deletions

View File

@ -16,6 +16,12 @@ New Features
* All augmented assignment operators (except `%=` and `^=`) now allow
more than two arguments.
Other Breaking Changes
------------------------------
* ``HySequence`` is now a subclass of ``tuple`` instead of ``list``.
Thus, a ``HyList`` will never be equal to a ``list``, and you can't
use ``.append``, ``.pop``, etc. on an expression or list.
Bug Fixes
------------------------------
* Statements in the second argument of `assert` are now executed.

View File

@ -60,6 +60,10 @@ Adding a HySequence to another iterable object reuses the class of the
left-hand-side object, a useful behavior when you want to concatenate Hy
objects in a macro, for instance.
HySequences are (mostly) immutable: you can't add, modify, or remove
elements. You can still append to a variable containing a HySequence with
``+=`` and otherwise construct new HySequences out of old ones.
.. _hylist:
@ -90,11 +94,6 @@ HyDict
``hy.models.HyDict`` inherits :ref:`HySequence` for curly-bracketed
``{}`` expressions, which compile down to a Python dictionary literal.
The decision of using a list instead of a dict as the base class for
``HyDict`` allows easier manipulation of dicts in macros, with the added
benefit of allowing compound expressions as dict keys (as, for instance,
the :ref:`HyExpression` Python class isn't hashable).
Atomic Models
-------------