)]}'
{"tests/hacking/README.rst":[{"author":{"_account_id":12395,"name":"Roman Vasylets","email":"pomeo92@gmail.com","username":"rvasilets"},"change_message_id":"d8bbecc5362533a50b2629d539488caaa2a80633","unresolved":false,"context_lines":[{"line_number":28,"context_line":"* [N352] - Ensure that string formatting only uses a mapping if multiple mapping keys are used."},{"line_number":29,"context_line":"* [N353] - Ensure that unicode() function is not uset because of absence in py3"},{"line_number":30,"context_line":"* [N354] - Ensure that ``:raises: Exception`` is not used"},{"line_number":31,"context_line":"* [N355] - Ensure that ``range()`` of ``len()`` to get index of iterable is not used"},{"line_number":32,"context_line":"* [N360-N370] - Reserved for rules related to CLI"},{"line_number":33,"context_line":" * [N360] - Ensure that CLI modules do not use ``rally.common.db``"},{"line_number":34,"context_line":" * [N361] - Ensure that CLI modules do not use ``rally.common.objects``"}],"source_content_type":"text/x-rst","patch_set":1,"id":"ba63e191_bfd0bd54","line":31,"updated":"2016-01-19 13:21:41.000000000","message":"In python 3 enumerate two times slower http://ideone.com/cWOwmQ Also if user wants to use only indexes without element value he will lose such possibility. User must to write:\n  lst2 \u003d []\n  for index, useless_val in enumerate(lst):\n      pass # some operation with lst2\n# instead of\n\n  lst2 \u003d []\n  for index in range(len(lst)):\n      pass # some operation with lst2\n\nI think that this is not the same :\"range()`` of ``len()`` to get index of iterable is not used\" and \"range()`` of ``len()`` to get the list of the iterable length\"","commit_id":"483b99d5384dd78dec23964936940450716fc759"},{"author":{"_account_id":10475,"name":"Alexander Maretskiy","email":"amaretskiy@mirantis.com","username":"maretskiy"},"change_message_id":"4cb340f09ed37df7ff5259c9c1492bdc4421bc9c","unresolved":false,"context_lines":[{"line_number":28,"context_line":"* [N352] - Ensure that string formatting only uses a mapping if multiple mapping keys are used."},{"line_number":29,"context_line":"* [N353] - Ensure that unicode() function is not uset because of absence in py3"},{"line_number":30,"context_line":"* [N354] - Ensure that ``:raises: Exception`` is not used"},{"line_number":31,"context_line":"* [N355] - Ensure that ``range()`` of ``len()`` to get index of iterable is not used"},{"line_number":32,"context_line":"* [N360-N370] - Reserved for rules related to CLI"},{"line_number":33,"context_line":" * [N360] - Ensure that CLI modules do not use ``rally.common.db``"},{"line_number":34,"context_line":" * [N361] - Ensure that CLI modules do not use ``rally.common.objects``"}],"source_content_type":"text/x-rst","patch_set":1,"id":"5a5ae5dd_a05d917a","line":31,"in_reply_to":"ba63e191_bfd0bd54","updated":"2016-02-05 14:39:44.000000000","message":"@Roman, disagree\n\n1) http://ideone.com/cWOwmQ is wrong example because enumerate generates list value, but range() doesn\u0027t, so let\u0027s make a small change:\n\n for x in range(len(lst)):\n    lst[x]  # here was `pass\u0027\n\nand you will see that enumerate is faster for both interpreters\n\n2) even if enumerate could be slower, the example iterates over one million-length list with difference in time measured in milliseconds - this is a nit-picking\n\n3) iteration over indexes only (values are not in use) is actually a rare case which can be implemented with extra variable. As you see in this patch, there are no such cases yet in Rally code","commit_id":"483b99d5384dd78dec23964936940450716fc759"}]}
