Bill Allombert on Tue, 04 Feb 2025 22:43:42 +0100
|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: branch bill-doctest: new default doctest
|
- To: pari-dev@pari.math.u-bordeaux.fr
- Subject: Re: branch bill-doctest: new default doctest
- From: Bill Allombert <Bill.Allombert@math.u-bordeaux.fr>
- Date: Tue, 4 Feb 2025 22:43:38 +0100
- Delivery-date: Tue, 04 Feb 2025 22:43:43 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=math.u-bordeaux.fr; s=2022; t=1738705420; bh=IADZ+5fcPetWiU5vs01hXBTvaHZS9E/C5PbHjcnS6Tk=; h=Date:From:To:Subject:References:In-Reply-To:From; b=ZOHjq4BeMX/44NpND6B2+Vr910Y0L42vXB6UiJP9DXhBCasLVzZYRPHFZKk2OYlHb G81e0mCTnYzwmVJX+z1pQr1zQEap8ymPn23H/hZ+zBopqnOh9Q+VNjAiE3vcJq3tOl LbIPW1vhudzUqbtvin8cFA03MmpefyfoCbvg0QJDHl8IjcUlfVPudLODnhx2U2kZnI OKhxga5lzivnxQMQHHiSUa+nScTnZZ+w//KFwpprvT9rjc96Z0/ZXnUTTAx/VAVMTp /lPkk9rI7lN6CcqiWU1+Z4oPhQ9GpuYlFGuyXUZfMbjfxhWk7PqYOauS2UHpY/nV81 sJ32MQGp8Z7cKdS9lSS34WZZpzJ5urjRy4TEZZog07ojyGmsQPIZLmInv1CP5f0qXy 7tj6wfJ92nUSOwyJcUiQq9pjiuUjSEnWUNfKu1JLD1CmtAAUqJRGmNj8tBCQExLJ5w /WpP6tAbN1ZfOffb1St6OgNyK3naiopoEAf4Z5+kah4MlNZb5XhO1mD92eJdKNbmM+ vitAOVgpauBypJuXpaYZqSsoKCJGnbgmpsmymWSXhcbEKUoRVR8Mos2t+/jjND2VZd jSUf6JJkNth+Xh7RWP7XKVHULUUue7OH41Dq3L2Sx8EeTCVDiFA7d3TDGIqowFcvZw W2uvx/HCafgTi9MRQanoBEwk=
- In-reply-to: <Z6FFkyj6RDMlYKND@seventeen>
- Mail-followup-to: pari-dev@pari.math.u-bordeaux.fr
- References: <Z6FFkyj6RDMlYKND@seventeen>
On Mon, Feb 03, 2025 at 11:39:15PM +0100, Bill Allombert wrote:
> Dear PARI developers,
>
> I have made a branch bill-doctest with a new default currently named 'doctest'
> to facilitate doctesting.
> When doctest is set, the GP interpretor behave slightly differently to
> allow to copy-paste examples from the documentation to GP without affecting too
> much normal usage:
>
> 1. "? " at the start of a line is skipped
> 2. "%nn =", "time =", "cpu time =" and "*** " at the start of a line cause all
> inputs until the next "?" or failing that, the end of input, to be skipped
After thinking about this, I suggest a simpler interface for doctest mode.
Any logical line starting with a whitespace (or TAB) is ignored unless the first
non-whitespace character is a ?, which is then also ignored.
Both the source and the 'gphelp -detex' version of the GP function documentation
has the property that any GP code example has each line starting by some spaces.
So I have made a new branch 'bill-doctest_ws' that implement this variant.
Cheers,
Bill.