Update documentation and add a NEW entry

This commit is contained in:
Simon Gomizelj 2018-04-04 17:47:36 -04:00 committed by Kodi Arfer
parent 291847af15
commit 69202df23d
3 changed files with 5 additions and 5 deletions

View File

@ -15,6 +15,8 @@ Other Breaking Changes
instead of ignoring it. This change increases consistency a bit instead of ignoring it. This change increases consistency a bit
and makes accidental unary uses easier to notice. and makes accidental unary uses easier to notice.
* `hy-repr` uses registered functions instead of methods * `hy-repr` uses registered functions instead of methods
* `HyKeyword` no longer inherits from the string type and has been
made into its own object type.
New Features New Features
------------------------------ ------------------------------

View File

@ -581,10 +581,10 @@ objects with the `__name__` magic will work.
.. code-block:: hy .. code-block:: hy
=> (keyword "foo") => (keyword "foo")
u'\ufdd0:foo' HyKeyword('foo')
=> (keyword 1) => (keyword 1)
u'\ufdd0:1' HyKeyword('foo')
.. _keyword?-fn: .. _keyword?-fn:

View File

@ -72,9 +72,7 @@ of bytes. So when running under Python 3, Hy translates ``"foo"`` and
keywords keywords
-------- --------
An identifier headed by a colon, such as ``:foo``, is a keyword. Keywords An identifier headed by a colon, such as ``:foo``, is a keyword. If a
evaluate to a string preceded by the Unicode non-character code point U+FDD0,
like ``"\ufdd0:foo"``, so ``:foo`` and ``":foo"`` aren't equal. However, if a
literal keyword appears in a function call, it's used to indicate a keyword literal keyword appears in a function call, it's used to indicate a keyword
argument rather than passed in as a value. For example, ``(f :foo 3)`` calls argument rather than passed in as a value. For example, ``(f :foo 3)`` calls
the function ``f`` with the keyword argument named ``foo`` set to ``3``. Hence, the function ``f`` with the keyword argument named ``foo`` set to ``3``. Hence,