Skip to content
This repository has been archived by the owner on Mar 23, 2023. It is now read-only.

Missing support for string slicing #77

Closed
frankban opened this issue Jan 9, 2017 · 3 comments
Closed

Missing support for string slicing #77

frankban opened this issue Jan 9, 2017 · 3 comments

Comments

@frankban
Copy link

frankban commented Jan 9, 2017

This error is returned at runtime: TypeError: string indices must be integers, not slice.

@ns-cweber
Copy link
Contributor

I reproduced with print("hello"[1:-1]).

@trotterdylan
Copy link
Contributor

Thanks for reporting this. Proper slice support was never implemented for str and unicode, although it is implemented for tuples and lists here. It should be a simple matter of handling slice type arguments for str here and similarly for unicode.

@frankban
Copy link
Author

Thanks for the quick fix!

pombredanne pushed a commit to pombredanne/grumpy that referenced this issue Mar 12, 2019
Added support for iter(f, sentinel)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants