[PYTHON MATRIX-SIG] Type naming conventions

James Hugunin jjh@Goldilocks.LCS.MIT.EDU
Fri, 26 Jan 96 11:28:26 EST


Returning one last time to the issue of naming conventions.  (I have
some time on my hands until a type coercion strategy is decided on).

I'd like to propose adding the following functions to Numeric.py.

Character
Integer
Float
Complex

On a typical system, Integer(16) would return "s" (the typecode for an
int).

Integer(64) would raise an exception on most systems, but would return
"l" on an alpha.

Thus you could write things like array([1,2,3], Integer(32)).

Things like Integer(minimumSize=16) would also be possible if we
agreed they made sense.  You'd also want to have Integer() just return
the typecode used by python ints.

This could be integrated with the standard array print function to
also have more pleasing outputs.

I know that Paul DuBois had some good comments on this previously in
regards to FORTRAN 90.  I'd be curious to know if this new proposal is
at all useful or reasonable.

Opinions?

-Jim

PS - Thanks to Mike McLay for the note that made me think of this again.

=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================