[issue31063] List Comprehension Bug

2017-07-27 Thread Steven D'Aprano
Steven D'Aprano added the comment: In the future, please do not post screenshots, please copy and paste the text. Screenshots are hard or impossible for the blind or visually impaired to see, but they can use a screen reader to work with text. -- nosy: +steven.daprano

[issue31063] List Comprehension Bug

2017-07-27 Thread Tim Peters
Tim Peters added the comment: This isn't a bug. 84 appears twice in the list, the first time at index 9. The .index() method finds the first (leftmost; smallest index) occurrence. Since 9 isn't even, the `if` test isn't satisfied, so 84 does not appear in the result. -- nosy:

[issue31063] List Comprehension Bug

2017-07-27 Thread Hyun Jae Moon
New submission from Hyun Jae Moon: Please check the photo attached. This was tested on Python 3.6.0. It seems that there is a bug in list comprehension. The list b should include 84 as well according to the code I wrote. I believe this is a quite severe bug. Thank you very much. --