[Python-Dev] PEP 203 Augmented Assignment (original) (raw)
Greg Ewing greg@cosc.canterbury.ac.nz
Tue, 01 Aug 2000 12:01:45 +1200 (NZST)
- Previous message: [Python-Dev] Negative slice steps considered unhealthy (extended slicing for lists)
- Next message: [Python-Dev] Reordering opcodes (PEP 203 Augmented Assignment)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
The way I understand this, mixing indices and slices is used all the time to reduce the dimensionality of an array.
I wasn't really suggesting that they should be disallowed. I was trying to point out that their existence makes it hard to draw a clear distinction between indexing and slicing.
If it were the case that
a[i,j,...,k]
was always equivalent to
a[i][j]...[k]
then there would be no problem -- you could consider each subscript individually as either an index or a slice. But that's not the way it is.
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 +--------------------------------------+
- Previous message: [Python-Dev] Negative slice steps considered unhealthy (extended slicing for lists)
- Next message: [Python-Dev] Reordering opcodes (PEP 203 Augmented Assignment)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]