On Thu, Dec 12, 2019 at 04:20:58PM -0500, Random832 wrote: > On Thu, Dec 12, 2019, at 15:59, Steven D'Aprano wrote: > > But why have the empty index default to () rather than None or 0 or -1 > > or slice(None, None, None) or some other value? That's an arbitrary > > and not a good one. > > My main reason for the suggestion was because that is the index used > to access the single data member of zero-dimension arrays in numpy. > [Ellipsis does also work, though]
Surely a zero-dimensional array ought to have no elements at all? -- Steven _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/RGXI4GODAU46VAHN7YI5KEH2E2G3A33H/ Code of Conduct: http://python.org/psf/codeofconduct/