If Scheme is so good why MIT drops it?

vippstar vippstar at gmail.com
Mon Jul 20 18:48:51 EDT 2009


On Jul 21, 1:22 am, Paul Rubin <http://phr...@NOSPAM.invalid> wrote:
> vippstar <vipps... at gmail.com> writes:
> > > I don't see how to implement such a thing in my code,
> > Write a function:
>
> >   (if (< x y)
> >       ValueError
> >       (/ x y))
>
> I meant changing the behavior of integer division in python.
You'd either have to hack an implementation or change the standard (I
just noticed python doesn't have one).

> > Wouldn't that mean 3/2 would also evaluate to ValueError?
>
> Yes, the idea was that one can take the view that integer division
> should not be allowed except through a 'div' function or some such.
You brought up 3/2 == ValueError as a more appropriate value for the
integer division to evaluate, rather than 0. I thought you meant
specifically those kinds of divisions.



More information about the Python-list mailing list