Bug or Feature?

Patrick Maupin pmaupin at speakeasy.net
Tue Nov 25 21:30:04 CET 2003

Michael Hudson wrote:

> I think someone has written such a UserInt somewhere...

There have been a couple of UserInts floating around.
I think the most recent was mine.

The bad news is that my UserInt module actually returns
ints for all operations.

The good news is that, being a lazy programmer, I didn't
actually write my "UserInt" module -- I let my computer
do it for me, by writing a script which would generate
the module.

The main reason I posted the script is because it can
easily be adapted to create any sort of UserXXX classes,
as well as to add any sort of behavior mods to those
classes.  I think it would be trivial to create a UserInt
class which returns other instances of itself for arithmetic
operations by using the script:



More information about the Python-list mailing list