wishlist Python3K: subclass ints
Neel Krishnaswami
neelk at brick.cswv.com
Sat Jun 10 09:07:04 EDT 2000
Moshe Zadka <moshez at math.huji.ac.il> wrote:
> On 9 Jun 2000, Aahz Maruch wrote:
>
> > Oh, I see. Hmmmm.... That makes a lot of sense, yes. I'm still having
> > a little trouble wrapping my head around how this works with
> > user-defined numeric types, but I'll let the people who are into
> > metaclass programming deal with it. ;-)
>
> Oh, it doesn't really. I mean, the best you can do (in a type/class
> dichotomy solved world), is inherit from "number", and change any of the
> methods: but that wouldn't help you at all to implement constructive
> reals the "right way".
Well, if we added multimethods, then it wouldn't be a problem (plug,
plug).
Neel
More information about the Python-list
mailing list