Q: Feature Wish: "%" Extension

Jive Dadson jdadson at ix.netcom.com
Mon Nov 5 21:49:47 EST 2001


Tim Peters wrote:
> ...
> 
> BTW, the "exactly 3 of each quotient" goes a long way toward explaining why
> floor division is less error-prone in practice (for newbies and experts):
> the "weird lump" around 0 doesn't exist. 

I liken it to a kink in a hose.  The mod operator (in Python at least)
wraps the number line into a coil.  If you use the other semantics, the
coil has a kink in it at zero where the coil changes direction, like a
clock suddenly deciding to run backwards.

Jive



More information about the Python-list mailing list