{"action":"created","issue":{"url":"https://api.github.com/repos/ipython/traitlets/issues/73","labels_url":"https://api.github.com/repos/ipython/traitlets/issues/73/labels{/name}","comments_url":"https://api.github.com/repos/ipython/traitlets/issues/73/comments","events_url":"https://api.github.com/repos/ipython/traitlets/issues/73/events","html_url":"https://github.com/ipython/traitlets/pull/73","id":103639769,"number":73,"title":"Cross Validation Using New Observe API","user":{"login":"rmorshea","id":4041990,"avatar_url":"https://avatars.githubusercontent.com/u/4041990?v=3","gravatar_id":"","url":"https://api.github.com/users/rmorshea","html_url":"https://github.com/rmorshea","followers_url":"https://api.github.com/users/rmorshea/followers","following_url":"https://api.github.com/users/rmorshea/following{/other_user}","gists_url":"https://api.github.com/users/rmorshea/gists{/gist_id}","starred_url":"https://api.github.com/users/rmorshea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmorshea/subscriptions","organizations_url":"https://api.github.com/users/rmorshea/orgs","repos_url":"https://api.github.com/users/rmorshea/repos","events_url":"https://api.github.com/users/rmorshea/events{/privacy}","received_events_url":"https://api.github.com/users/rmorshea/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":14,"created_at":"2015-08-28T03:22:39Z","updated_at":"2015-09-02T19:27:15Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/ipython/traitlets/pulls/73","html_url":"https://github.com/ipython/traitlets/pull/73","diff_url":"https://github.com/ipython/traitlets/pull/73.diff","patch_url":"https://github.com/ipython/traitlets/pull/73.patch"},"body":"brief example\r\n\r\n```python\r\n\r\nfrom traitlets import HasTraits, Int, validate\r\n\r\nclass H(HasTraits):\r\n    \r\n    i = Int()\r\n    j = Int()\r\n    \r\n    @validate('i')\r\n    def _i_validator(self, change):\r\n        return change['new']+1\r\n\r\nh  = H()\r\nh.i = 1\r\nprint('result : '+ str(h.i))\r\n```\r\n\r\n`'result : 2'`\r\n"},"comment":{"url":"https://api.github.com/repos/ipython/traitlets/issues/comments/137220657","html_url":"https://github.com/ipython/traitlets/pull/73#issuecomment-137220657","issue_url":"https://api.github.com/repos/ipython/traitlets/issues/73","id":137220657,"user":{"login":"rmorshea","id":4041990,"avatar_url":"https://avatars.githubusercontent.com/u/4041990?v=3","gravatar_id":"","url":"https://api.github.com/users/rmorshea","html_url":"https://github.com/rmorshea","followers_url":"https://api.github.com/users/rmorshea/followers","following_url":"https://api.github.com/users/rmorshea/following{/other_user}","gists_url":"https://api.github.com/users/rmorshea/gists{/gist_id}","starred_url":"https://api.github.com/users/rmorshea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rmorshea/subscriptions","organizations_url":"https://api.github.com/users/rmorshea/orgs","repos_url":"https://api.github.com/users/rmorshea/repos","events_url":"https://api.github.com/users/rmorshea/events{/privacy}","received_events_url":"https://api.github.com/users/rmorshea/received_events","type":"User","site_admin":false},"created_at":"2015-09-02T19:27:15Z","updated_at":"2015-09-02T19:27:15Z","body":"The original cross-validators had a set number of arguments that allowed. Seems reasonable to keep it that way and just pass that change dictionary. Unless there's an overhead cost to passing multiple arguments, keeping the number the same makes it easier to keep track of what form the handler took in the parent class when dealing with inheritance."}}