Guido van Rossum schrieb:
> I'm not sure that subclassing ints gives us much. We could make int
> and long "final" types, and then all we have to do is tweak type() and
> __class__ so that they always return the 'int' type.

I don't think this can work - there would be too many ways for the
"real" types to leak, anyway. People would come up with hacks
like reload(sys), and then complain that they have to use such
hacks.

> Alternatively, yes, there would be some minimal awareness of the two
> types in Python -- but nothing like we currently have; dispatching on
> exact type (which we discourage anyway) would be the only case. Would
> that be so bad?

I thought it was the ultimate goal of PEP 237 to unify int and long,
in all respects.

I'll do some benchmarking.

Regards,
Martin

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to