wishlist Python3K: subclass ints

Aahz Maruch aahz at netcom.com
Thu Jun 8 14:25:36 EDT 2000


In article <393FD0C7.D70479A2 at visionart.com>,
Pete Shinners  <pete at visionart.com> wrote:
>
> - Also gone are all the nit-picking type checking routines.
>   instead of first checking if a variable is a "class" type,
>   then checking if the object is a certain class, all variables
>   hold objects of the same "rank". the best move would be to
>   have "int" and "float" be subclassed from a base class like
>   "realnumber".

Close, but no cigar.  Start with the base class "number".  Then
everything else follows: int, float, rational, complex.
--
                      --- Aahz (Copyright 2000 by aahz at netcom.com)

Androgynous poly kinky vanilla queer het    <*>     http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6

"You could make Eskimos emigrate to the Sahara by vigorously arguing --
at hundreds of screens' length -- for the wonder, beauty, and utility of 
snow."  -- PNH to rb in r.a.sf.f



More information about the Python-list mailing list