On 22/08/07, Guido van Rossum <[EMAIL PROTECTED]> wrote: > > * Add Demo/classes/Rat.py to the stdlib? > > Yes, but it needs a makeover. At the very least I'd propose the module > name to be rational.
If no-one else gets to this, I might take a look. But I'm not likely to make fast progress as I don't have a lot of free time... (And I don't have a Windows compiler, so I'll need to set up a Linux VM and find out how to build Py3K on that!) > The code is really old. Too right - it's riddled with "isinstance" calls which probably aren't very flexible, and it seems to try to handle mixed-mode operations with float and complex, which I can't see the use for... Given that the basic algorithms are pretty trivial, the major part of any makeover would be rewriting the special method implementations to conform to the Rational ABC. A makeover is probably more or less a rewrite. I wrote a rational number class in C++ for Boost once, it wouldn't be too hard to port. Paul. _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com