Skip to content

MAINT: document change to bytestring index behavior #5977

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 17, 2015

Conversation

ahaldane
Copy link
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
Copy link
Member

charris commented Jun 17, 2015

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
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
Copy link
Member

charris commented Jun 17, 2015

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