unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Tino Calancha <tino.calancha@gmail.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: emacs-devel@gnu.org
Subject: Re: [Emacs-diffs] master bd22beb: Add seq-random-elt to seq.el
Date: Tue, 25 Oct 2016 23:48:22 +0900 (JST)	[thread overview]
Message-ID: <alpine.DEB.2.20.1610252341030.10512@calancha-pc> (raw)
In-Reply-To: <jwv60oga4ji.fsf-monnier+gmane.emacs.devel@gnu.org>



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	other threads:[~2016-10-25 14:48 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20161025103309.2182.7179@vcs.savannah.gnu.org>
     [not found] ` <20161025103309.77C982201D5@vcs.savannah.gnu.org>
2016-10-25 13:53   ` [Emacs-diffs] master bd22beb: Add seq-random-elt to seq.el Stefan Monnier
2016-10-25 14:23     ` Damien Cassou
2016-10-25 14:26       ` Stefan Monnier
2016-10-25 14:48         ` Tino Calancha [this message]
2016-10-25 15:05           ` Nicolas Petton
2016-10-25 15:07         ` Nicolas Petton

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.DEB.2.20.1610252341030.10512@calancha-pc \
    --to=tino.calancha@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).