Vectors in Visual Python

Terry Reedy tjreedy at udel.edu
Wed Feb 9 15:00:26 EST 2005


"Arthur" <ajsiegel at optonline.com> wrote in message 
news:pbvj01tiob4v5i6usnkr08j10s9koeh5kn at 4ax.com...
> is that VPython "vectors" are in effect flat 3 element Numeric arrays,
> and Numeric ararys can be constructed with Float64 specified as the
> datatype.  (wonder if that speciufication is a "declaration", and if
> so whether that would indicate some conflict between Python's ideology
> (Alex's version) and that of its defacto standard numerical processing
> library - but I digress) .

I (and I believe Alex) object to name declaration *statements* and/or the 
strong typing of *names*.

I (and I believe Alex) approve of the strong typing of *objects*, which 
must somehow be indicated in the object creation *expression*.  This is 
absolutely fundamental to Python.  There are at least three ways to 
indicate the desired object type: literal type, constuctor (and other 
function) identity, and constructor (and other function) arguments.

When constructor arguments only specifiy the type of members of a 
homogeneous collection object, the visible type() of the collection itself 
may not be affected.  I believe member type specifications for numerical 
and num- arrays are like this, as they are for stdlib array.arrays.

Sorry, no conflict ;-)

Terry J. Reedy






More information about the Python-list mailing list