Lihu <l...@starry.com> added the comment:
Sorry, I guess some context might be helpful. I'm writing a program that links unittest-based tests with a third-party test tracking/reporting system. Said third-party software has a concept of test suites/cases that doesn't align 1:1 with unittest, so I need to manipulate the unittest objects a bit to get them to connect smoothly. `list(test_suite)` is a bit clunky for me, since I'm already copying said list in order to do my manipulation. So I end up with expressions like: ``` my_cases = list(my_custom_generator(list(test_suite))) ``` Certainly not the end of the world, and it works just fine, but it's redundant and I need to do it a lot. I realize that `list(iterator)` is an increasingly common idiom in python 3, but I thought I'd throw this usecase out there for your consideration. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue35281> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com