Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Deprecate the round builtin

Received: by 10.180.86.133 with SMTP id p5mr1193996wiz.3.1349041789509;
        Sun, 30 Sep 2012 14:49:49 -0700 (PDT)
X-BeenThere: python-ideas@googlegroups.com
Received: by 10.216.197.66 with SMTP id s44ls972779wen.8.gmail; Sun, 30 Sep
 2012 14:49:49 -0700 (PDT)
Received: by 10.180.73.134 with SMTP id l6mr1202497wiv.1.1349041789353;
        Sun, 30 Sep 2012 14:49:49 -0700 (PDT)
Received: by 10.180.73.134 with SMTP id l6mr1202496wiv.1.1349041789347;
        Sun, 30 Sep 2012 14:49:49 -0700 (PDT)
Return-Path: <python-ideas-bounces+python-ideas-garchive-35620=googlegroups....@python.org>
Received: from mail.python.org (mail.python.org. [82.94.164.166])
        by gmr-mx.google.com with ESMTPS id hm1si578503wib.3.2012.09.30.14.49.49
        (version=TLSv1/SSLv3 cipher=OTHER);
        Sun, 30 Sep 2012 14:49:49 -0700 (PDT)
Received-SPF: pass (google.com: domain of python-ideas-bounces+python-ideas-garchive-35620=googlegroups....@python.org designates 82.94.164.166 as permitted sender) client-ip=82.94.164.166;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of python-ideas-bounces+python-ideas-garchive-35620=googlegroups....@python.org designates 82.94.164.166 as permitted sender) smtp.mail=python-ideas-bounces+python-ideas-garchive-35620=googlegroups....@python.org; dkim=pass header...@python.org
Received: from albatross.python.org (localhost [127.0.0.1])
	by mail.python.org (Postfix) with ESMTP id 3XVKzK0Nt7zQbZ
	for <python-ideas-garchive-35620@googlegroups.com>; Sun, 30 Sep 2012 23:49:49 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=python.org; s=200901;
	t=1349041789; bh=wgb+GsmHMEXuDQOXc6pgMeaV8Eh2BbVeo616DOytzPU=;
	h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:To:Cc:
	 Subject:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:
	 List-Subscribe:Content-Type:Sender;
	b=Bz+jGTTrsDvSGDfdm2M+EWOl0vypI8Aq6+KcOypnuHOJb3cShNtAYxO/Gx/uU0IrG
	 4U7vaiTd6dgELllPJATHTG0JNLkWyEFT6i+IxUQv6mWXiO3XeUps9FUUN0TqO1vnYl
	 /OR8aLKjRKho8EIoV9NNEBKu6psSTT/tbYxnJMps=
X-Original-To: python-id...@python.org
Delivered-To: python-id...@mail.python.org
Received: from albatross.python.org (localhost [127.0.0.1])
	by mail.python.org (Postfix) with ESMTP id 3XVKyQ6DQmzQRh
	for <python-id...@python.org>; Sun, 30 Sep 2012 23:49:02 +0200 (CEST)
X-Spam-Status: OK 0.002
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:: [': 0.03;
	'subject:Python': 0.05; 'though:': 0.07; 'typeerror:': 0.09;
	'suggest': 0.11; 'library': 0.15; 'gregory': 0.16; 'objects?':
	0.16; 'subject:ideas': 0.16; 'wrote:': 0.17; 'numerical': 0.17;
	'>>>': 0.18; 'subject:] ': 0.19; 'module': 0.19; 'math': 0.20;
	'define': 0.20; '"",': 0.22; 'cc:2**0': 0.23; 'seems': 0.23;
	'cc:no real name:2**0': 0.24; 'cc:addr:python.org': 0.25; 'header
	:In-Reply-To:1': 0.25; '(most': 0.27; 'message-
	id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'str': 0.29; 'file':
	0.32; 'defining': 0.33; 'traceback': 0.33; 'problem': 0.33;
	'skip:& 20': 0.33; "can't": 0.34; 'received:google.com': 0.34;
	'done': 0.34; 'received:209.85': 0.35; 'method': 0.36; 'why':
	0.37; 'rather': 0.37; 'received:209': 0.37; 'subject:-': 0.40;
	'header:Received:5': 0.40; 'smith': 0.71; 'subject:round': 0.84;
	'proposal,': 0.91
Received: from localhost (HELO mail.python.org) (127.0.0.1)
	by albatross.python.org with SMTP; 30 Sep 2012 23:49:02 +0200
Received: from mail-lb0-f174.google.com (mail-lb0-f174.google.com
	[209.85.217.174])
	(using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
	(No client certificate requested)
	by mail.python.org (Postfix) with ESMTPS
	for <python-id...@python.org>; Sun, 30 Sep 2012 23:49:02 +0200 (CEST)
Received: by lbon3 with SMTP id n3so3495832lbo.19
	for <python-id...@python.org>; Sun, 30 Sep 2012 14:49:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113;
	h=mime-version:in-reply-to:references:from:date:message-id:subject:to
	:cc:content-type;
	bh=0tTIHnRu3uZOC2AFxQb7yWKjUAGi+4CzdpzyF6LTyWo=;
	b=Zj79z3MnFzcOm9W5lzq79HV/LNjjApK7AMUMHsI4nQFWuMSO9BcsRaYOpyV7Fsimhx
	NBM1eNhg61g8xG8myIrVWxcBgxoFgq9okVA1gxW50qrXXDvrZXQPKTJJYn4ik9blwGqm
	XmxAhej+6g997Ls/jOvcuzKBVFk1V5K2hR1HaI0TJqGG21Gj83+op5kj3ZoIDVQtwiuS
	BMTRfMsKM1Kz+jqeIF+tHqtqtXCuZBVW7cGEXNlFAfc7tQDgveIGqWhoETWeuJVtm5HP
	n+PO85LHyE4hF0JzASFTWI9mAWmvQnEbmPsH7FBHd8EXWP8tlP8HM5a84aNovfKUqy30
	JJbw==
Received: by 10.152.104.50 with SMTP id gb18mr10541937lab.9.1349041742146;
	Sun, 30 Sep 2012 14:49:02 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.112.12.178 with HTTP; Sun, 30 Sep 2012 14:48:21 -0700 (PDT)
In-Reply-To: <CAGE7PNJ0BBmbr78a51rYADwq123rsyxJyKR8Xax0j6RQqz4...@mail.gmail.com>
References: <CAEBZo3MW9LUKmAjpR53X2dHSz54jvOpv1vZodZRJaHPokyx...@mail.gmail.com>
	<CAAu3qLVrda99RYi2qJpTTGcz9cSbAyb36AynynDpi9Kszj9...@mail.gmail.com>
	<50635956.4050...@egenix.com>
	<CAEBZo3NHfvHzUQge2S0+RXjaZU4OsyjZL9_gJ2n5cT9ge3+...@mail.gmail.com>
	<CAH0mxTS4PTmP3FPygtqBeF2W8uCVwhis7Nk3Jy1c0idKdqd...@mail.gmail.com>
	<CAMjeLr8JjgTjzJYe0g741+LyuSZtk1q-MTcCWmBnNF=bah_...@mail.gmail.com>
	<20120926212127.GA9...@iskra.aviel.ru>
	<CAMjeLr8VCXBdBjv7f5DXvqT+_ftfouhq4DAz=mo=4Gy_LaU...@mail.gmail.com>
	<50642918.1060...@canterbury.ac.nz>
	<CAGE7PNJ0BBmbr78a51rYADwq123rsyxJyKR8Xax0j6RQqz4...@mail.gmail.com>
From: Joshua Landau <joshua.landau...@gmail.com>
Date: Sun, 30 Sep 2012 22:48:21 +0100
Message-ID: <CAN1F8qWsA55OKQbnFfggtCF0_4zbqjjNh59zyxOPR2yJTm8...@mail.gmail.com>
To: "Gregory P. Smith" <g...@krypto.org>
Cc: python-id...@python.org
Subject: Re: [Python-ideas] Deprecate the round builtin
X-BeenThere: python-id...@python.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Discussions of speculative Python language ideas
	<python-ideas.python.org>
List-Unsubscribe: <http://mail.python.org/mailman/options/python-ideas>,
	<mailto:python-ideas-requ...@python.org?subject=unsubscribe>
List-Archive: <http://mail.python.org/pipermail/python-ideas/>
List-Post: <mailto:python-id...@python.org>
List-Help: <mailto:python-ideas-requ...@python.org?subject=help>
List-Subscribe: <http://mail.python.org/mailman/listinfo/python-ideas>,
	<mailto:python-ideas-requ...@python.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============1996658025=="
Errors-To: python-ideas-bounces+python-ideas-garchive-35620=googlegroups....@python.org
Sender: "Python-ideas"
	<python-ideas-bounces+python-ideas-garchive-35620=googlegroups....@python.org>

--===============1996658025==
Content-Type: multipart/alternative; boundary=f46d04083df7d3edde04caf241d2

--f46d04083df7d3edde04caf241d2
Content-Type: text/plain; charset=ISO-8859-1

On 30 September 2012 22:38, Gregory P. Smith <g...@krypto.org> wrote:

> Why suggest adding new round-like functions to the math module rather than
> defining a new round method on all numerical objects?


 >>> round("")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: type str doesn't define __round__ method

It seems it is done like that already ;)
This seems like a problem for the proposal, though: we can't have it in the
math library if it's a method!

--f46d04083df7d3edde04caf241d2
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

On 30 September 2012 22:38, Gregory P. Smith <span dir=3D"ltr">&lt;<a href=
=3D"mailto:g...@krypto.org" target=3D"_blank">g...@krypto.org</a>&gt;</span=
> wrote:<br><div class=3D"gmail_quote"><blockquote class=3D"gmail_quote" st=
yle=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

Why suggest adding new round-like functions to the math module rather than =
defining a new round method on all numerical objects?</blockquote><div><br>=
</div><div>=A0&gt;&gt;&gt; round(&quot;&quot;)</div><div>Traceback (most re=
cent call last):</div>

<div>=A0 File &quot;&lt;stdin&gt;&quot;, line 1, in &lt;module&gt;</div><di=
v>TypeError: type str doesn&#39;t define __round__ method</div><div><br></d=
iv><div>It seems it is done like that already ;)</div><div>This seems like =
a problem for the proposal, though: we can&#39;t have it in the math librar=
y if it&#39;s a method!</div>

</div>

--f46d04083df7d3edde04caf241d2--

--===============1996658025==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Python-ideas mailing list
Python-id...@python.org
http://mail.python.org/mailman/listinfo/python-ideas

--===============1996658025==--