[Web-SIG] Re: Bill's comments on WSGI draft 1.4

tony at lownds.com tony at lownds.com
Mon Sep 6 18:44:56 CEST 2004


> [skipping stuff that Ian answered]
>
> At 12:47 PM 9/2/04 -0700, Bill Janssen wrote:
>
>>I'm not familiar with all the ins and outs of files on Python and
>>Jython and IronPython, so I'll just say, reasonable enough.  Though
>>I'd prefer to say, a file-like object (whatever that means).
>
> File-like is out of scope; there were only ever two kinds of objects
> intended to be returnable:
>
> 1) Iterables (the initial scope)
>
> 2) Objects that map to an operating system file descriptor, as an optional
> special case to increase performance (added later per user request)
>

But using a file object as an iterable is going to give terrible
performance, and fileno() isn't good enough for Jython and IronPython. I
don't see why allowing a file-like object is unreasonable. If an
application returns a file-like object, it should render the same data
whether accessed through read(), or fileno(), or next().

-Tony



More information about the Web-SIG mailing list