[Python-Dev] PEP 3144 review. (original) (raw)
Daniel Stutzbach daniel at stutzbachenterprises.com
Mon Sep 28 23:37:38 CEST 2009
- Previous message: [Python-Dev] PEP 3144 review.
- Next message: [Python-Dev] PEP 3144 review.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Mon, Sep 28, 2009 at 4:29 PM, "Martin v. Löwis" <martin at v.loewis.de>wrote:
I guess a close case would be rational numbers: clearly, 3÷2 == 6÷4; would a Python library still remember (and repr) the original numerator and denominator?
No need for a hypothetical, rational numbers were added in Python 2.6:
Python 2.6.2 (r262:71600, Apr 15 2009, 07:20:39) [GCC 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)] on cygwin Type "help", "copyright", "credits" or "license" for more information.
import fractions fractions.Fraction(6,4) Fraction(3, 2)
-- Daniel Stutzbach, Ph.D. President, Stutzbach Enterprises, LLC <http://stutzbachenterprises.com> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20090928/0c9f5679/attachment.htm>
- Previous message: [Python-Dev] PEP 3144 review.
- Next message: [Python-Dev] PEP 3144 review.
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]