{"action":"created","issue":{"url":"https://api.github.com/repos/soft-matter/slicerator/issues/4","labels_url":"https://api.github.com/repos/soft-matter/slicerator/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/soft-matter/slicerator/issues/4/comments","events_url":"https://api.github.com/repos/soft-matter/slicerator/issues/4/events","html_url":"https://github.com/soft-matter/slicerator/pull/4","id":107262901,"number":4,"title":"API/REF: Change how construction works.","user":{"login":"danielballan","id":2279598,"avatar_url":"https://avatars.githubusercontent.com/u/2279598?v=3","gravatar_id":"","url":"https://api.github.com/users/danielballan","html_url":"https://github.com/danielballan","followers_url":"https://api.github.com/users/danielballan/followers","following_url":"https://api.github.com/users/danielballan/following{/other_user}","gists_url":"https://api.github.com/users/danielballan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielballan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielballan/subscriptions","organizations_url":"https://api.github.com/users/danielballan/orgs","repos_url":"https://api.github.com/users/danielballan/repos","events_url":"https://api.github.com/users/danielballan/events{/privacy}","received_events_url":"https://api.github.com/users/danielballan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-09-18T19:27:03Z","updated_at":"2015-09-18T19:53:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/soft-matter/slicerator/pulls/4","html_url":"https://github.com/soft-matter/slicerator/pull/4","diff_url":"https://github.com/soft-matter/slicerator/pull/4.diff","patch_url":"https://github.com/soft-matter/slicerator/pull/4.patch"},"body":"## Ways to constructor a Slicerator\r\n\r\n1. From a function (any callable) that accepts an integer argument\r\n\r\n    The length must be specified.\r\n\r\n    ```\r\n    Slicerator.from_func(func, 10)\r\n    ```\r\n\r\n2. From a list or any object that supports `__getitem__` and `__len__`\r\n\r\n    ```\r\n    Slicerator.from_list([1,2,3])\r\n    ```\r\n\r\n3. From an object with a method that accepts an integer argument\r\n\r\n    ```\r\n    Slicerator(obj, 'method_name')\r\n    ```\r\n\r\nAny of these \"constructors\" take an optional argument, `expose_attrs`, a whitelist of attributes that will be propagated through the Slicerator and its children. In a later PR, the pipeline decorator might let the user blacklist attributes that a pipeline invalidates. For example, a pipeline that crops should not propagate the original `frame_shape` attr.\r\n\r\nFor simplicity, the convenience constructors (1 and 2) take no other arguments. The `__init__` (3) takes a couple others, which Slicerators use to create child Slicerators.\r\n\r\nDiscuss! @caspervdw @tacaswell @nkeim "},"comment":{"url":"https://api.github.com/repos/soft-matter/slicerator/issues/comments/141550927","html_url":"https://github.com/soft-matter/slicerator/pull/4#issuecomment-141550927","issue_url":"https://api.github.com/repos/soft-matter/slicerator/issues/4","id":141550927,"user":{"login":"danielballan","id":2279598,"avatar_url":"https://avatars.githubusercontent.com/u/2279598?v=3","gravatar_id":"","url":"https://api.github.com/users/danielballan","html_url":"https://github.com/danielballan","followers_url":"https://api.github.com/users/danielballan/followers","following_url":"https://api.github.com/users/danielballan/following{/other_user}","gists_url":"https://api.github.com/users/danielballan/gists{/gist_id}","starred_url":"https://api.github.com/users/danielballan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danielballan/subscriptions","organizations_url":"https://api.github.com/users/danielballan/orgs","repos_url":"https://api.github.com/users/danielballan/repos","events_url":"https://api.github.com/users/danielballan/events{/privacy}","received_events_url":"https://api.github.com/users/danielballan/received_events","type":"User","site_admin":false},"created_at":"2015-09-18T19:53:39Z","updated_at":"2015-09-18T19:53:39Z","body":"@caspervdw You were right. I \"simplified\" the code without thinking and then forgot about it when that test was failing. All tests pass."}}