From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Arne Babenhauserheide Newsgroups: gmane.lisp.guile.user Subject: Re: How to write documentation comments for procedures? Date: Tue, 21 Aug 2018 23:41:09 +0200 Message-ID: <87sh375rey.fsf@web.de> References: <31082a15-b9f4-aba2-6a2b-2e784cf55406@gmail.com> <3ac96df4-1577-5912-ae9f-21e6ba7ef009@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1534887901 19072 195.159.176.226 (21 Aug 2018 21:45:01 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 21 Aug 2018 21:45:01 +0000 (UTC) User-Agent: mu4e 1.0; emacs 25.3.1 Cc: guile-user@gnu.org, Zelphir Kaltstahl To: Arun Isaac Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Tue Aug 21 23:44:56 2018 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fsESN-0004q4-Sz for guile-user@m.gmane.org; Tue, 21 Aug 2018 23:44:55 +0200 Original-Received: from localhost ([::1]:56004 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fsEUU-0008S7-DT for guile-user@m.gmane.org; Tue, 21 Aug 2018 17:47:06 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fsEPI-0003a5-RN for guile-user@gnu.org; Tue, 21 Aug 2018 17:41:45 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fsEPE-0003nu-Jy for guile-user@gnu.org; Tue, 21 Aug 2018 17:41:44 -0400 Original-Received: from mout.web.de ([212.227.15.3]:49983) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fsEPC-0003mH-AN for guile-user@gnu.org; Tue, 21 Aug 2018 17:41:40 -0400 Original-Received: from fluss ([84.165.21.232]) by smtp.web.de (mrweb004 [213.165.67.108]) with ESMTPSA (Nemesis) id 0MHdwC-1fow5B3kh2-003PM0; Tue, 21 Aug 2018 23:41:26 +0200 In-reply-to: X-Provags-ID: V03:K1:qmjqzx1SIKO+yhLmCFRzwLcx3LpBHduQB6GIhxwK+u0rdEibbn6 JB9NXEMHoe+8lsdQq1qcfVPjjAJu8ngU/Ipcm37Qt+b1BuXixlYWRzj7A6efCnyLy5liGph tvGejXgWjjivjZ3BThm+MZILcL4lrNSJwCtYS22qgoIShVb4FhYbIYOQbw6nCfBix1ZL7s/ zyncWOXp13aHC9bh2D4tQ== X-UI-Out-Filterresults: notjunk:1;V01:K0:BHXWxuVCOJI=:ayJDWGrgXiinOSCSJOJEZB LMq8Ce863lTnxCwCafwcM77Uzn6CAcwDR7SJTAXmaUPP/d7H5rpicJg6WgVJBBjZiLEJQMlX1 7dm3SLStK+ztTzCfubTP/N+4Xn8PrZJMeRMsxsvl7NkIuQL4m5TldfEanhH965OofIkth7sBe vxMvGI7ujuj55RbcNqgXhQ/Jer5FEzQz00T5KyJKwP0kQXNZrO2IOiQMj7QavKacc6zUpHRMw F/MtLjHTMH0zCkaDf2GWjeHodnyYB+oHZtu8iwbPyQr0VcVHMsWu7hMVDhRy6sj5QDFHubxIV wwWp4AH9Qn2codw4NKYc1p2mijI9cMFafppztmCu4aEeFPqqhfRhTlLUvP7h+Czy1Tno9AgyT n92AKHSMIOPdLtGLE9aIcDTw0Fm/LYQh8sIDS0IQT2bPNQwi14iyZzKhzhOMq1fAcpOMtOi6D cvHkDuD3NC2e2/rd0ZJxWbfTops1tyj4xtXko9XAUdF48oLY9iZxc0MnxR0rYkMz0C+j6yrCA PUuzgzihDEhwbYi6VyZMaWz3BZPQY+2FjEdjsKbtaYu45vIJ+AjeY533+FBfUPgkVJtIxr8cK 0WxA7ONQPuH3VtXSsTW+w1LB+Gp1ZPpUqEfUef0JogmQxVwTFSIw8TvuQ83sFWiIApqqrvQo0 uFnFZy4OFHSaPdWWvcZiBWVo/WZJhMzhhGfBgBySPQtGEKYTF4r+tdzuLx+Il4ybz0vVkdn50 yq/Ogkcm3F7PJAC4Z9PglpWSfLVyf9WQHxFzWmwCmrfutBX1JDF2jJ/2psg= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 212.227.15.3 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:14750 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Arun Isaac writes: >> It still makes the second and later lines not indented though >> (starting at position 0, while the first line is indented, not >> starting at 0). > > Looking at the guile source code, the lack of indentation in the second > and later lines seems to be the convention. So, I don't think this is a > problem. Something like the following is fine. > > (define (foo arg) > "This is the first line. > This is the second line." > #t) This is what I do, too. Note also that you can add *data* to the procedure, too, by adding a literal array after the docstring. I use that for the equivalent of Python doctests, but without the brittleness of writing stringly code: (define (example) "Testing doctests" #((tests ('mytest (test-assert #t) (test-assert #f)))) #f) =2D Example: https://bitbucket.org/ArneBab/wisp/src/7501dc0db3f8cebf49b48634719ab82b4a= 509a79/examples/doctests-test.scm =2D Doctest-runner: https://bitbucket.org/ArneBab/wisp/src/7501dc0db3f8cebf49b48634719ab82b4a= 509a79/examples/doctests.scm Best wishes, Arne =2D- Unpolitisch sein hei=C3=9Ft politisch sein ohne es zu merken --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEE801qEjXQSQPNItXAE++NRSQDw+sFAlt8hwQACgkQE++NRSQD w+uwbA/9HKYCnl7pahmM1iNUkotYZS/TaMpNaOS5cKPi3Tm1pkt24JfavdfYLRxy MpDB/nvED1tWhKA1z6Walgz53Ewc3vGTVkitnbC9R8NefjtYVaD4EKEsa+Ij/wqi Iybj/rTPIOgshAKmK+nV6nsLb+l/svuDRrrHd1suEB2ALqjc6wlgJ5InVEMGYAwc Jjy7xmMvSjbA8BEcnQW0iZt/+RrLFYJljSgsN4TEbpygYIZ/riKJXBlrENopKFiZ UemRgGiuzAmW9q2sdTh8sVpsUdhqhM2oVp3W4HAvEWqru7ahLaGblTG7m0f2U83i 4Yiznd3MukzoJZ3y1oPoCCsrRp8o2eNpJAQOv3v3h/8Ve2I/QRwhCI2Fb5KHjZFg F82DG5vKxgR+6EmgC3TSSAcMGYsF+ZG3srk/vln0P9ktn6C7TijW3TB/REQAb1VV a5DL1CAiG0fCVu8K9tlbbEgGJZRyw4o/V3g53Pg6lpyNbZYkWhEaoWcrJUxe0pN4 BG99eUU9D3JnRxL6neA1gculRGueh53pXfQ1TL2U+J/VQa+FW17ZM/JenrgsNhoe twt5fHaET2wfsczerIkg4sLtVUjGRB8tmQVQH9F5y7qwa6s5LroirLEDQQSe4Hwy yzhlgLjIP/TUCGJE8/JOAxji6MQWUOf6KfDUJbtby5MPFavEEvuIswQBAQgAHRYh BN0ovebZh1yrzkqLHdzPDbMLwQVIBQJbfIcEAAoJENzPDbMLwQVIT+YD/3oI7ek8 QePCu/HDEsKASQZHTBCp48+2ROTCAghD1/qGHGJzkxvTb8Qv6S52i8wtZWnW96g7 5gtn0HI7VoQkQbcCCUc2bqmrKRskXfO+VYOW93VT0Jw/9+iKD72F8xRC9/hDFVa4 9XBiZs+Gg3ITLxPR05kZwl+pBdsvGr20rwXl =EnMB -----END PGP SIGNATURE----- --=-=-=--