Allowing zero-dimensional subscripts

Fredrik Lundh fredrik at pythonware.com
Sat Jun 10 09:22:45 CEST 2006


Carl Banks wrote:

> How would you index a 2-D array?  With a 2-tuple.
> How would you index a 1-D array?  With a 1-tuple.
> How would you index a 0-D array?  ...

array dimensions don't exist at the Python level.  you're confusing 
behaviour that a custom class may provide with Python's view of things.

(and None is of course the standard value for "not there")

</F>




More information about the Python-list mailing list