{"action":"created","issue":{"url":"https://api.github.com/repos/construct/construct/issues/255","repository_url":"https://api.github.com/repos/construct/construct","labels_url":"https://api.github.com/repos/construct/construct/issues/255/labels{/name}","comments_url":"https://api.github.com/repos/construct/construct/issues/255/comments","events_url":"https://api.github.com/repos/construct/construct/issues/255/events","html_url":"https://github.com/construct/construct/issues/255","id":183905520,"number":255,"title":"Printing a Container with a large GreedyBytes field could be truncated","user":{"login":"beardypig","id":16033421,"avatar_url":"https://avatars.githubusercontent.com/u/16033421?v=3","gravatar_id":"","url":"https://api.github.com/users/beardypig","html_url":"https://github.com/beardypig","followers_url":"https://api.github.com/users/beardypig/followers","following_url":"https://api.github.com/users/beardypig/following{/other_user}","gists_url":"https://api.github.com/users/beardypig/gists{/gist_id}","starred_url":"https://api.github.com/users/beardypig/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/beardypig/subscriptions","organizations_url":"https://api.github.com/users/beardypig/orgs","repos_url":"https://api.github.com/users/beardypig/repos","events_url":"https://api.github.com/users/beardypig/events{/privacy}","received_events_url":"https://api.github.com/users/beardypig/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/construct/construct/labels/feature%20request","name":"feature request","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":22,"created_at":"2016-10-19T09:06:28Z","updated_at":"2016-10-20T23:50:05Z","closed_at":null,"body":"When you print a `Container` that has a `GreedyBytes` (or similar) field that is large (>80 bytes?) all of the data is currently printed which can is sometimes inconvenient. For example, if you are parsing a file format that contains blobs of data, video perhaps, and you print the parsed `Container` you may get something like\r\n```\r\nContainer:\r\n    size = 1000\r\n    has_data = True\r\n    data = ^@^@^@^B     <E0>^@^@^@^TA<9B><A2><E2>^D^?^@\r\n    O<B2>^Zc<BD><80><B9><E1><E1><94>j!^@^@^@^B  <E0>^@^@^@^NA<9B><C2><E2>^D^?^@^@^EQ<C4>H<8B>8^@^@^@^B  <E0>^@^@^@^NA\r\n<9B><E2><E2>^D^?^@^V?<B0>*<C0><B2><81...\r\n```\r\nIt might be better to truncate the output for very long strings.\r\n```\r\nContainer:\r\n    data = data = ^@^@^@^B     <E0>^@^@^@^TA<9B><A2><E2>^D^?^@\r\n    O<B2>^Zc<BD><80><B9><E1><E1><94>j!^@^@^@^B  <E0>^@^@^@^NA<9B><C2><E2>^D^?^@^@^EQ<C4>H<8B>8^@^@^@^B  <E0>^@^@^@^NA\r\n<9B><E2><E2>^D^?^@^V?<B0>*<C0>\r\n    [truncated]\r\n```"},"comment":{"url":"https://api.github.com/repos/construct/construct/issues/comments/255258724","html_url":"https://github.com/construct/construct/issues/255#issuecomment-255258724","issue_url":"https://api.github.com/repos/construct/construct/issues/255","id":255258724,"user":{"login":"arekbulski","id":5385838,"avatar_url":"https://avatars.githubusercontent.com/u/5385838?v=3","gravatar_id":"","url":"https://api.github.com/users/arekbulski","html_url":"https://github.com/arekbulski","followers_url":"https://api.github.com/users/arekbulski/followers","following_url":"https://api.github.com/users/arekbulski/following{/other_user}","gists_url":"https://api.github.com/users/arekbulski/gists{/gist_id}","starred_url":"https://api.github.com/users/arekbulski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arekbulski/subscriptions","organizations_url":"https://api.github.com/users/arekbulski/orgs","repos_url":"https://api.github.com/users/arekbulski/repos","events_url":"https://api.github.com/users/arekbulski/events{/privacy}","received_events_url":"https://api.github.com/users/arekbulski/received_events","type":"User","site_admin":false},"created_at":"2016-10-20T23:50:05Z","updated_at":"2016-10-20T23:50:05Z","body":"Can you add identical test for py3? "}}
{"actor":{"display_login":"arekbulski"}}