[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master bd22beb: Add seq-random-elt to seq.el

From: Tino Calancha
Subject: Re: [Emacs-diffs] master bd22beb: Add seq-random-elt to seq.el
Date: Tue, 25 Oct 2016 23:48:22 +0900 (JST)
User-agent: Alpine 2.20 (DEB 67 2015-01-07)

On Tue, 25 Oct 2016, Stefan Monnier wrote:

+Return nil if SEQUENCE is nil."
+  (if (seq-empty-p sequence)
+      (error "Sequence cannot be empty")

Hmm... which is it?

I'm not sure I understand your question.

The question was: should I obey the docstring or the code?
The code, always the code.

Indeed, pretty consistent, after all this function is about getting a _random_ element from a sequence; if the doc string assures something opposite as the code, then it's very hard to predict the result of the coin flipping experiment, regardless of which is the underline random generation engine.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]