On 19.02.2005, at 15:28, Robert Kern wrote:
Except that these types probably can't be derived from the builtin int. The C layouts would have to be compatible. They'd probably have to be a separate hierarchy.
They could all derive from a common (yet-to-be-written) base class that has no data layout at all.
True. However, if we introduce a bona fide TypeObject hierarchy for numerical scalars that *can* be profitably used outside of the array context, it's *going* to be used outside of the array context. If it gets into the
True, though I expect its use to be limited to the numeric community.
standard library, it can't just be a large number hierarchy for our use; it will have to be *the* number hierarchy for Python and include PyLongObjects and decimals and rationals.
That would be preferable indeed.
And that's probably a bit more than we care to deal with to get multiarrays into the core.
It all depends on the reaction of the Python developer community. We won't know before asking. Konrad. -- ------------------------------------------------------------------------ ------- Konrad Hinsen Laboratoire Leon Brillouin, CEA Saclay, 91191 Gif-sur-Yvette Cedex, France Tel.: +33-1 69 08 79 25 Fax: +33-1 69 08 82 61 E-Mail: khinsen@cea.fr ------------------------------------------------------------------------ -------