[Edu-sig] Subclassing type int

Kirby Urner urnerk@qwest.net
Sat, 22 Sep 2001 15:47:43 -0700


OK, so now that builtin classes are subclassable,
I'm thinking to subclass the int type to create a
type of integer that adds, multiplies, and raises
to powers modulo N (N = some natural number).

Someting starting like:

    class I(int):

If anyone finds this an interesting challenge, I'd
be happy to see this be a thread.   Gotta download
the most recent 2.2 to play.

Kirby