Re: Do Not See My Error
Rich Shepard <[email protected]>
| Newsgroups | gmane.comp.python.db.pysqlite.user |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 13 Sep 2006, dcharno wrote: > For large files xreadlines() is more efficient because it does not first > read all the lines into a list. I think you are supposed to just iterate > over the file after python 2.3. Here is a test I tried: Thank you. I found a reference to the difference between range() and xrange(), and that is the same difference between readlines() and xreadlines() I suppose. With the former pair, range(10000) will create a list of 10,000 integers, then iterate through them one at a time while xrange(10000) will iterate without first building a separate list. Rich -- Richard B. Shepard, Ph.D. | The Environmental Permitting Applied Ecosystem Services, Inc.(TM) | Accelerator <http://www.appl-ecosys.com> Voice: 503-667-4517 Fax: 503-667-8863