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
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Case Van Horsen  
View profile  
 More options Sep 30 2012, 6:11 pm
From: Case Van Horsen <cas...@gmail.com>
Date: Sun, 30 Sep 2012 15:08:07 -0700
Local: Sun, Sep 30 2012 6:08 pm
Subject: Re: [Python-ideas] Deprecate the round builtin
On Sun, Sep 30, 2012 at 2:51 PM, Joshua Landau
<joshua.landau...@gmail.com> wrote:
> On 30 September 2012 22:48, Joshua Landau <joshua.landau...@gmail.com>
> wrote:

>> This seems like a problem for the proposal, though: we can't have it in
>> the math library if it's a method!

> Now I think about it: yeah, it can be. We just coerce to float/decimal
> first. *sigh*

math.ceil(x), math.floor(x), and math.trunc(x) and round(x) already
call the special methods x.__ceil__, x.__floor__, x.__round__, and
x.__trunc__. So those four functions already work with decimal
instances (and other numeric types that support those methods.)

casevh

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

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

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.