[PYTHON MATRIX-SIG] EmptyArray as false

Doug Heisterkamp drh@cherokee.unl.edu
Mon, 19 Aug 1996 14:16:50 -0500 (CDT)


It would be useful if an empty array acted as false, in the
same way that an empty list does.

>>> from Numeric import *
>>> a = array([])
>>> a
EmptyArray
>>> if a: print "a==TRUE"
... 
a==TRUE
>>> if []: print "[] == TRUE"
... 
>>> 

Doug Heisterkamp
drh@cherokee.unl.edu

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

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