Bug or Feature?

Patrick Maupin pmaupin at speakeasy.net
Tue Nov 25 15:30:04 EST 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:

http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&oe=UTF-8&selm=mailman.85.1066086131.2192.python-list%40python.org

Regards,
Pat




More information about the Python-list mailing list