diff --git a/NEWS.rst b/NEWS.rst index 232e986..d210e71 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -15,6 +15,8 @@ Other Breaking Changes instead of ignoring it. This change increases consistency a bit and makes accidental unary uses easier to notice. * `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 ------------------------------ diff --git a/docs/language/core.rst b/docs/language/core.rst index 3b089ea..4df50c8 100644 --- a/docs/language/core.rst +++ b/docs/language/core.rst @@ -581,10 +581,10 @@ objects with the `__name__` magic will work. .. code-block:: hy => (keyword "foo") - u'\ufdd0:foo' + HyKeyword('foo') => (keyword 1) - u'\ufdd0:1' + HyKeyword('foo') .. _keyword?-fn: diff --git a/docs/language/syntax.rst b/docs/language/syntax.rst index fa1e7b6..0bcde89 100644 --- a/docs/language/syntax.rst +++ b/docs/language/syntax.rst @@ -72,9 +72,7 @@ of bytes. So when running under Python 3, Hy translates ``"foo"`` and keywords -------- -An identifier headed by a colon, such as ``:foo``, is a keyword. Keywords -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 +An identifier headed by a colon, such as ``:foo``, is a keyword. If a 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 the function ``f`` with the keyword argument named ``foo`` set to ``3``. Hence,