[Python-Dev] trunc()

Georg Brandl g.brandl at gmx.net
Sat Jan 26 09:43:20 CET 2008


Paul Moore schrieb:
> On 24/01/2008, Jeffrey Yasskin <jyasskin at gmail.com> wrote:
>> int has to be a builtin because it's a fundamental type. trunc()
>> followed round() into the builtins. I have no opinion on whether ceil
>> and floor should move there; it probably depends on how often they're
>> used.
> 
> Suggestion:
> 
> - int() has to stay in builtins for obvious reasons.
> - put *all* of trunc, ceil, floor, round into math.

That, and making int(float) == int(trunc(float)) seems like reasonable
behavior to me as a person not involved in the discussion.

Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.



More information about the Python-Dev mailing list