[Python-Dev] PEP 203 Augmented Assignment
Greg Ewing
greg@cosc.canterbury.ac.nz
Fri, 28 Jul 2000 15:52:33 +1200 (NZST)
Ka-Ping Yee <ping@lfw.org>:
> __get__(index, ...) # I want an ITEM.
> __getslice__(slice-object, ...) # I want a SLICE.
I like this (although it would be safer if the new-style
__getslice__ had a new name as well).
> This would require detection of whether any of the components
> of a multidimensional (i.e. tuple) index were slices
Doesn't the parser know this already?
By the way, if you're going to make a clear separation between items
and slices, then either *none* or *all* of the members of a
multidimensional index should be slices, and mixing them should
be an error!
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg@cosc.canterbury.ac.nz +--------------------------------------+