{"action":"opened","issue":{"url":"https://api.github.com/repos/data-8/datascience/issues/235","repository_url":"https://api.github.com/repos/data-8/datascience","labels_url":"https://api.github.com/repos/data-8/datascience/issues/235/labels{/name}","comments_url":"https://api.github.com/repos/data-8/datascience/issues/235/comments","events_url":"https://api.github.com/repos/data-8/datascience/issues/235/events","html_url":"https://github.com/data-8/datascience/issues/235","id":170719056,"number":235,"title":"Add ways to manipulate strings without square-bracket indexing","user":{"login":"henryem","id":2343874,"avatar_url":"https://avatars.githubusercontent.com/u/2343874?v=3","gravatar_id":"","url":"https://api.github.com/users/henryem","html_url":"https://github.com/henryem","followers_url":"https://api.github.com/users/henryem/followers","following_url":"https://api.github.com/users/henryem/following{/other_user}","gists_url":"https://api.github.com/users/henryem/gists{/gist_id}","starred_url":"https://api.github.com/users/henryem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henryem/subscriptions","organizations_url":"https://api.github.com/users/henryem/orgs","repos_url":"https://api.github.com/users/henryem/repos","events_url":"https://api.github.com/users/henryem/events{/privacy}","received_events_url":"https://api.github.com/users/henryem/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/data-8/datascience/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":{"login":"henryem","id":2343874,"avatar_url":"https://avatars.githubusercontent.com/u/2343874?v=3","gravatar_id":"","url":"https://api.github.com/users/henryem","html_url":"https://github.com/henryem","followers_url":"https://api.github.com/users/henryem/followers","following_url":"https://api.github.com/users/henryem/following{/other_user}","gists_url":"https://api.github.com/users/henryem/gists{/gist_id}","starred_url":"https://api.github.com/users/henryem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henryem/subscriptions","organizations_url":"https://api.github.com/users/henryem/orgs","repos_url":"https://api.github.com/users/henryem/repos","events_url":"https://api.github.com/users/henryem/events{/privacy}","received_events_url":"https://api.github.com/users/henryem/received_events","type":"User","site_admin":false},"assignees":[{"login":"henryem","id":2343874,"avatar_url":"https://avatars.githubusercontent.com/u/2343874?v=3","gravatar_id":"","url":"https://api.github.com/users/henryem","html_url":"https://github.com/henryem","followers_url":"https://api.github.com/users/henryem/followers","following_url":"https://api.github.com/users/henryem/following{/other_user}","gists_url":"https://api.github.com/users/henryem/gists{/gist_id}","starred_url":"https://api.github.com/users/henryem/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/henryem/subscriptions","organizations_url":"https://api.github.com/users/henryem/orgs","repos_url":"https://api.github.com/users/henryem/repos","events_url":"https://api.github.com/users/henryem/events{/privacy}","received_events_url":"https://api.github.com/users/henryem/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2016-08-11T18:54:19Z","updated_at":"2016-08-11T18:54:19Z","closed_at":null,"body":"In Data8 we're trying to avoid square-bracket indexing because it confuses some students.  This makes working with strings a little challenging.  Technically, a lot can be done with the workflow `string -> list -> table -> manipulate -> list -> string`, but that's pretty ugly.  I'd like to add a few functions to `datascience` to work around this.\r\n\r\nConcretely, here are two things I'd like to be able to do.  (Ani says some connector instructors are interested in the first one, too.)\r\n\r\n1. Index a subrange of a string.  This could be done like `Table.take` (e.g. `item_range(\"foobar\", np.arange(1, 5))`) or like range indexing (e.g. `item_range(\"foobar\", 1, 5)`).  This would have the added benefit of working on NumPy arrays.\r\n\r\n2. Have a version of the `split` method that returns an array instead of a list.  Otherwise we have to wrap calls to `split` in `np.array`, which is confusing when students have only a vague idea about the difference between lists and arrays.  Since we can't teach regular expressions, `split` is a fairly core text manipulation tool.\r\n\r\nI realize this is not really in-scope for the `datascience` library.  Other options include avoiding text manipulation; making another library for Data8-specific helper functions; or teaching lists and square-bracket indexing.  I don't really like any of those, but I'm open to other suggestions."}}
{"actor":{"display_login":"henryem"}}