On Nov 18, 9:01 am, Simon King <[EMAIL PROTECTED]> wrote:
> Dear William,
>
> On Nov 18, 5:26 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
>
> > Which is one more reason to consider it a mis-feature.  I had no
> > clue when I wrote that code whether # optional or putting those three
> > words in would turn out to be the way to go.  In retrospect, # optional is,
> > since generally speaking, "explicit is better than implicit".
>
> Here I disagree, for the following reason.

There has been talk about making "#optional" more clever, i.e. one
would feed it a list of optional components and then -optional would
only test for those components that are installed. One could still
have a global switch to do what you want, but let it be less random
than some words in the text.

> I have many examples for a class that depends on SmallGroups library
> being installed.
> With the "requires optional package" feature, I can turn off all
> examples at once.
>
> Am I right that it'd be needed to put "# optional" after each input
> line? Then, I think the "requires optional package" really is a
> feature, not a misfeature.
>
> Similar things hold with the "# long time" feature: It switches off
> one input line (unless -long is used), but it does not switch off the
> lines that depend on it.
> How painful if you have many lines of code that only take short time
> but have to be commented # long time since they depend on one long
> command from the very beginning of the example!
>
> I think it would be nice to have a way to define a whole block of code
> as "being long". E.g.
>     sage: One_long_command # starting long example
>     sage: many
>     sage: short
>     sage: commands  # ending long example
>     sage: continuing
>     sage: independent
>     sage: computations
>
> so that the first four lines (but not the last three) require sage -t -
> long
>
> Yours
>     Simon

Cheers,

Michael
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to