Rational numbers

Janos Blazi jblazi at netsurf.de
Sat Jan 29 03:13:05 EST 2000


It is probably a matter of taste and may also depend on how much code you
already have...
I would very much prefer 3/4 != 0.

J.B.



Martin von Loewis <loewis at informatik.hu-berlin.de> schrieb in im
Newsbeitrag: p6qoga6j800.fsf at informatik.hu-berlin.de...
> "Janos Blazi" <jblazi at netsurf.de> writes:
>
> > What do you think, wouldn't it be nice if Pythony had the built-in data
type
> > "rational" as LISP has? (I would like it. The truth is that the packages
> > are a bit less confortable.
>
> What's wrong with
>
> >>> from yarn import Rat
> >>> Rat(4,5) * Rat(7,12)
> Rat(7, 15)
>
> I can't imagine that you can get this much more comfortable, without
> breaking existing programs. I guess you'd like 4/5 return a rational
> number, even though it currently gives you 0. I would not like that.
>
> Regards,
> Martin
>




  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
   http://www.newsfeeds.com       The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including  Dedicated  Binaries Servers ==-----



More information about the Python-list mailing list