Re: Comprehensions
"Mark Hahn" <[email protected]>
| Newsgroups | gmane.comp.lang.prothon.user |
|---|---|
| Message-ID | <000d01c4697d$450ced00$0d01a8c0@MarkVaio> |
Some generator/iterator questions (warning, late night questions)... 1) Should functions like split be returning iterators instead of lists? What if you run split on a 100 megabyte file? Can you run split on a file instead of a string in memory? 2) Should we visit every function that returns a list and change it to return an iterator? 3) What is the difference between an iterator and a generator? Does a generator generate values or does it generate iterator objects? Enquiring minds want to know.