From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tino Calancha Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master bd22beb: Add seq-random-elt to seq.el Date: Tue, 25 Oct 2016 23:48:22 +0900 (JST) Message-ID: References: <20161025103309.2182.7179@vcs.savannah.gnu.org> <20161025103309.77C982201D5@vcs.savannah.gnu.org> <87lgxctslx.fsf@cassou.me> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=US-ASCII X-Trace: blaine.gmane.org 1477407402 5792 195.159.176.226 (25 Oct 2016 14:56:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 25 Oct 2016 14:56:42 +0000 (UTC) User-Agent: Alpine 2.20 (DEB 67 2015-01-07) Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 25 16:56:38 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bz39R-0000Ca-8E for ged-emacs-devel@m.gmane.org; Tue, 25 Oct 2016 16:56:29 +0200 Original-Received: from localhost ([::1]:55219 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bz39T-00054n-Aa for ged-emacs-devel@m.gmane.org; Tue, 25 Oct 2016 10:56:31 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59749) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bz31k-0006zO-J2 for emacs-devel@gnu.org; Tue, 25 Oct 2016 10:48:33 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bz31f-0004GU-R8 for emacs-devel@gnu.org; Tue, 25 Oct 2016 10:48:32 -0400 Original-Received: from mail-pf0-x22f.google.com ([2607:f8b0:400e:c00::22f]:34069) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1bz31f-0004Fi-LF for emacs-devel@gnu.org; Tue, 25 Oct 2016 10:48:27 -0400 Original-Received: by mail-pf0-x22f.google.com with SMTP id n85so4227659pfi.1 for ; Tue, 25 Oct 2016 07:48:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:date:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=vv7/7CmSYJmWNuIXtNf7/SlrmaQigQ/xHrL2uTzH2pk=; b=AOMzLLnRmsFkydpv7pMJiYUXE1Ei0Ts6M5Yfs+8A5ZAshffC8YnyNT9JqBrGo1Qypb LvzxZb8046Iukrj7PRRKDNt7k/T7emPzWHZdmNzni7xmRKAGhbP0lMIRkXRz7ffq7zMF 1nFoDOk+8oYu1wmhMsbzGLJ2XH+XqcQRqzdl0RqHUsGowA0Ld/3+aEE9HOeuLENqoZlo or3AIVPwl18JIWbjmoS3WzYOOA6JMoh86PnxD8dF1nyE74VYgUGUnpbPS24Y069S+36A HPxq1vgrAWcJFS+T/3AzT1zsOtNcnp22oq5BcCe5cSAnNiblLjzWFttVoH7p4Us9U6Q6 RGlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:date:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=vv7/7CmSYJmWNuIXtNf7/SlrmaQigQ/xHrL2uTzH2pk=; b=dbiG/PALB86p+9JvW6rtr4Vp0cPbwoZ/qZbyGQbVxi2PdDVXBCJ1yc1FPjg5ePW38Z 1pC/q1J5TTiKYUEXVVs9Vor2rPDPz9uvn3VXgHy9O9NdRy/9D/J9Lmyl+i8zJ90HHt+f jC4vW4XCVBUN6hImeo8XIexbDN0Tli8K8a8sBHpuTsDhSJge1qsQnUbBt74qzfCWbqif 6WnoaJaXPgg4c8bzuJ1bHqEkPFn9ecYpRxnw3qKOHQLiuKVEN3PR1bxjr9bWiARFHh16 TSNJkdQY1hyv8G4TYh2QbJmw+IYUM810wMnskvMF+wjwj74MVObWBSyIPsEWWpNqTD5r rfCg== X-Gm-Message-State: ABUngvcpE7vG4Ml6BtMtX4cnLRtEz8lNOPwaATIKNBWQvjXR5sKEgFKFCTDSVXIySa8y0g== X-Received: by 10.98.37.198 with SMTP id l189mr40140282pfl.39.1477406906265; Tue, 25 Oct 2016 07:48:26 -0700 (PDT) Original-Received: from calancha-pc (57.92.100.220.dy.bbexcite.jp. [220.100.92.57]) by smtp.gmail.com with ESMTPSA id m129sm6131167pfm.13.2016.10.25.07.48.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Oct 2016 07:48:25 -0700 (PDT) X-Google-Original-From: Tino Calancha X-X-Sender: calancha@calancha-pc In-Reply-To: X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:400e:c00::22f X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:208771 Archived-At: 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.