From 247e64950de7f96d239e0136b253413d47463ec2 Mon Sep 17 00:00:00 2001 From: digikar99 Date: Tue, 19 Feb 2019 18:39:24 +0530 Subject: [PATCH 1/2] Clean up the documentation of `defclass` --- docs/language/api.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/docs/language/api.rst b/docs/language/api.rst index 4f52418..ab39770 100644 --- a/docs/language/api.rst +++ b/docs/language/api.rst @@ -415,14 +415,16 @@ They can be used to assign multiple variables at once: defclass -------- -New classes are declared with ``defclass``. It can takes two optional parameters: -a vector defining a possible super classes and another vector containing -attributes of the new class as two item vectors. +New classes are declared with ``defclass``. It can take three optional parameters in the following order: +a list defining (a) possible super class(es), a string (:term:`py:docstring`) and another list containing +attributes of the new class along with their corresponding values. .. code-block:: clj (defclass class-name [super-class-1 super-class-2] - [attribute value] + "docstring" + [attribute1 value1 + attribute2 value2] (defn method [self] (print "hello!"))) From d312dd5df2c4c2b470c7c1585fc58ac28dbcaf72 Mon Sep 17 00:00:00 2001 From: digikar99 Date: Tue, 19 Feb 2019 19:51:17 +0530 Subject: [PATCH 2/2] Fix a ReST underline --- docs/language/api.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/language/api.rst b/docs/language/api.rst index ab39770..c406679 100644 --- a/docs/language/api.rst +++ b/docs/language/api.rst @@ -239,7 +239,7 @@ as the user enters *k*. comment ----- +------- The ``comment`` macro ignores its body and always expands to ``None``. Unlike linewise comments, the body of the ``comment`` macro must