Comment on PEP-0238
Terry Reedy
tjreedy at home.com
Tue Jul 3 01:48:24 EDT 2001
"Greg Ewing" <greg at cosc.canterbury.ac.nz> wrote in message
news:3B412444.3D7774A7 at cosc.canterbury.ac.nz...
> Terry Reedy wrote:
> >
> > Example: a school has 4
> > first grade classrooms and 82 new first graders. If we split the
students
> > evenly among the classrooms, how many in each? The correct answer is
20
> > with 2 left over, not 20.5.
>
> I'd say the correct answer is neither of those -- it's
> (21, 21, 20, 20). Leaving the two remaining pupils
> uneducated is not an option that I'd expect any
> decent school to consider. :-)
Of course, in this particular situation. But the question of what to do
with remainders (set them aside or allocate somehow) is dependent on
recognizing that there is or should be a remainder to think about, which
was the main thrust of my post. The proper allocation procedure depends on
the particular situation and the units the number represent, which gets to
the point I made later in the post.
Terry J. Reedy
More information about the Python-list
mailing list