Shouldn't urlopen "files" be iterable?

Magnus Lie Hetland mlh at
Sat Sep 29 23:22:49 CEST 2001

"Grant Edwards" <grante at> wrote in message
news:slrn9rcdao.1al.grante at
> On Sat, 29 Sep 2001 22:54:53 +0400, Oleg Broytmann <phd at> wrote:
> >> How do you request part of a file via HTTP?
> >
> >   Using ranges.

> It's going to be pretty hard to determine whether it "cheaper"
> to download the whole thing and discard unwanted portions or to
> establish multiple conenctions and send multiple requests.

Certainly. I guess my main motivation for wanting to use
file iteration is an aesthetic one... I like it. And I certainly
like "file-like" objects to _behave like_ files. Isn't that what
they're supposed to do?

Again, I see no reason not to include this. (If need be, I'll be
happy to provide a patch.)

> --
> Grant Edwards

yours, Magnus


  Magnus Lie Hetland

 "Reality is that which, when you stop believing in
  it, doesn't go away."           -- Philip K. Dick

More information about the Python-list mailing list