Alex Martelli wrote: > Well, x=23 on one side, and x[]=23 aka x[()]=23 on the other, have > drastically different semantics. Indexing refers to the contents of > the zero-dimensional container, rather than to a name to which the > container happens to be bound (but isn't any more, once one assigns to > that name rather than to an indexing thereof).
It's not clear to me that a 0-D array should be regarded as a container holding a single item, rather than just an item on its own. Think about how you get from an N dimensional array to an N-1 dimensional array: you index it, e.g. A2 = [[1, 2], [3, 4]] # a 2D array A1 = A2[1] # a 1D array A0 = A1[1] # a 0D array??? print A0 What do you think this will print? -- Greg _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com