Skip to content

MAINT: document change to bytestring index behavior - #5977

Merged
charris merged 1 commit into
numpy:masterfrom
ahaldane:bytestring_releasenote
Jun 17, 2015
Merged

charris merged 1 commit into
numpy:masterfrom
ahaldane:bytestring_releasenote

Conversation

@ahaldane

Copy link
Copy Markdown
Member

@charris I guess there was one change in #5636 which maybe needs documenting:

Indexing with a byte-string in python 3 now raises IndexError, not ValueError.

Indexing with a bytestring has never done anything useful so I can't imagine anyone caring, but here's a release note for it if desired.

Bytestring indices now raise IndexError, not ValueError

[ci skip]
@charris

charris commented Jun 17, 2015

Copy link
Copy Markdown
Member

Thanks. How did bytestring indexing used to work, was it for structured arrays?

@charris charris added this to the 1.10.0 release milestone Jun 17, 2015
@ahaldane

Copy link
Copy Markdown
Member Author

As far as I understand, bytestring indexing never worked for anything.

Unit tests were added to make sure they didn't work, in case code involving unicode/strings accidentally accepted them.

I can see that #3798 has already partially converted the ValueErrors to IndexErrors, so my changes can be seen as a continuation of that.

charris added a commit that referenced this pull request Jun 17, 2015
MAINT: document change to bytestring index behavior
@charris
charris merged commit a580d6f into numpy:master Jun 17, 2015
@charris

charris commented Jun 17, 2015

Copy link
Copy Markdown
Member

I was asking because I had never heard of bytestring indexing and had no idea what it was supposed to do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants