[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] Implement doctest utility as guild script
From: |
Ludovic Courtès |
Subject: |
Re: [PATCH] Implement doctest utility as guild script |
Date: |
Sun, 29 Sep 2013 21:14:37 +0200 |
User-agent: |
Gnus/5.130007 (Ma Gnus v0.7) Emacs/24.3 (gnu/linux) |
Dmitry Bogatov <address@hidden> skribis:
> Ludovic Courtès <address@hidden> writes:
>
>> I share Ian Price’s concerns regarding the fundamental idea behind
>> doctest. Namely, writing code in strings means that syntax errors can
>> only be detected very late, and that the code in there cannot easily
>> refer to anything outside;
> What do you mean outside? I think it encourages pure function.
I meant that sometimes you want to factorize helpers for the test suite
as separate procedures/macros, and it may be tricky to use them from
within the docstring.
>> furthermore, that pollutes docstrings, whose
>> goal is to provide a help string for users.
> Definitely right. At current state. But it is possible to separate
> actual english documentation string and doctests. Displaying them
> in (help function-name) may be turned off or, imho (since I like examples
> in documentation), better, made optional.
OK, but that’s not supported yet. :-)
Thanks,
Ludo’.