Update NEWS and documentation
This commit is contained in:
parent
7aaece3725
commit
e5461f171c
6
NEWS.rst
6
NEWS.rst
@ -16,6 +16,12 @@ New Features
|
|||||||
* All augmented assignment operators (except `%=` and `^=`) now allow
|
* All augmented assignment operators (except `%=` and `^=`) now allow
|
||||||
more than two arguments.
|
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
|
Bug Fixes
|
||||||
------------------------------
|
------------------------------
|
||||||
* Statements in the second argument of `assert` are now executed.
|
* Statements in the second argument of `assert` are now executed.
|
||||||
|
@ -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
|
left-hand-side object, a useful behavior when you want to concatenate Hy
|
||||||
objects in a macro, for instance.
|
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:
|
.. _hylist:
|
||||||
|
|
||||||
@ -90,11 +94,6 @@ HyDict
|
|||||||
``hy.models.HyDict`` inherits :ref:`HySequence` for curly-bracketed
|
``hy.models.HyDict`` inherits :ref:`HySequence` for curly-bracketed
|
||||||
``{}`` expressions, which compile down to a Python dictionary literal.
|
``{}`` 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
|
Atomic Models
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user