[Python-Dev] Unifying Long Integers and Integers: baseint (original) (raw)
Guido van Rossum guido at python.org
Fri Aug 13 04:35:24 CEST 2004
- Previous message: [Python-Dev] Unifying Long Integers and Integers: baseint
- Next message: [Python-Dev] Re: Decorators after 'def' should be reconsidered
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Guido:
> > if the only reason for it is to use isinstance? > > So that an extension author could write an int-like type deriving > from it? But didn't you just say that people shouldn't be deriving their own int-like types from baseinteger?
Indeed, in general they shouldn't. But for specialized purposes it might be needed (that's why I emphasized could).
Unfortunately, for the purpose of having one's ersatz integers accepted as the real thing by the Python core, you pretty much have to inherit from int.
So my only reason to make baseinteger a class rather than a tuple is consistency with basestring.
--Guido van Rossum (home page: http://www.python.org/~guido/)
- Previous message: [Python-Dev] Unifying Long Integers and Integers: baseint
- Next message: [Python-Dev] Re: Decorators after 'def' should be reconsidered
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]