{"action":"created","issue":{"url":"https://api.github.com/repos/nicoddemus/pytest-issues-migration/issues/26","labels_url":"https://api.github.com/repos/nicoddemus/pytest-issues-migration/issues/26/labels{/name}","comments_url":"https://api.github.com/repos/nicoddemus/pytest-issues-migration/issues/26/comments","events_url":"https://api.github.com/repos/nicoddemus/pytest-issues-migration/issues/26/events","html_url":"https://github.com/nicoddemus/pytest-issues-migration/issues/26","id":84620544,"number":26,"title":"len(list) should be summarized in most cases","user":{"login":"nicoddemus","id":1085180,"avatar_url":"https://avatars.githubusercontent.com/u/1085180?v=3","gravatar_id":"","url":"https://api.github.com/users/nicoddemus","html_url":"https://github.com/nicoddemus","followers_url":"https://api.github.com/users/nicoddemus/followers","following_url":"https://api.github.com/users/nicoddemus/following{/other_user}","gists_url":"https://api.github.com/users/nicoddemus/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoddemus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoddemus/subscriptions","organizations_url":"https://api.github.com/users/nicoddemus/orgs","repos_url":"https://api.github.com/users/nicoddemus/repos","events_url":"https://api.github.com/users/nicoddemus/events{/privacy}","received_events_url":"https://api.github.com/users/nicoddemus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-06-03T15:26:46Z","updated_at":"2015-06-03T15:26:49Z","closed_at":"2015-06-03T15:26:46Z","body":"I have some code which runs:\n\n  assert len(mylist) == 2 *** *** 10\n\nWhen this fails, py.test prints out something like:\n\n   + len([something, more, else, thing, bla, ...]) == (2 *** *** 10)\n\nThe problem is that it's impossible to tell exactly why the assert is failing -- the whole list can't reasonably be printed, and truncating the list loses the information that actually matters.\n\nIf a list inside a len is truncated, it would make sense to either display another level of simplification OR to print only the length (since you can't display the whole list).\n\n----------------------------------------\n- Bitbucket: https://bitbucket.org/pytest-dev/pytest/issue/8\n- Originally reported by: [wtanksleyjr](http://bitbucket.org/wtanksleyjr)\n- Originally created at: 2010-11-30T23:36:36.061\n"},"comment":{"url":"https://api.github.com/repos/nicoddemus/pytest-issues-migration/issues/comments/108482827","html_url":"https://github.com/nicoddemus/pytest-issues-migration/issues/26#issuecomment-108482827","issue_url":"https://api.github.com/repos/nicoddemus/pytest-issues-migration/issues/26","id":108482827,"user":{"login":"nicoddemus","id":1085180,"avatar_url":"https://avatars.githubusercontent.com/u/1085180?v=3","gravatar_id":"","url":"https://api.github.com/users/nicoddemus","html_url":"https://github.com/nicoddemus","followers_url":"https://api.github.com/users/nicoddemus/followers","following_url":"https://api.github.com/users/nicoddemus/following{/other_user}","gists_url":"https://api.github.com/users/nicoddemus/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoddemus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoddemus/subscriptions","organizations_url":"https://api.github.com/users/nicoddemus/orgs","repos_url":"https://api.github.com/users/nicoddemus/repos","events_url":"https://api.github.com/users/nicoddemus/events{/privacy}","received_events_url":"https://api.github.com/users/nicoddemus/received_events","type":"User","site_admin":false},"created_at":"2015-06-03T15:26:48Z","updated_at":"2015-06-03T15:26:48Z","body":"I admit that old code looks like it knows what it's doing -- that's a long way to go in order to make things less convenient.\r\nMy first guess was that it was trying to avoid some dangerous builtins, like open() and such; but looking at the code I see that it's also trying to avoid expanding functions that return bool! What's going on there? There's nothing dangerous about returning bool.\r\n\r\nI give up... I have no idea why this code is there. I only know that while it was there, I had to write and run a manual test (with prints).\r\n\r\n-Wm\r\n\n\n----------------------------------------\nOriginal comment by: [wtanksleyjr](http://bitbucket.org/wtanksleyjr)\n"}}