opensubscriber
   Find in this group all groups
 
Unknown more information…

w : web-sig@python.org 4 January 2011 • 10:30AM -0500

Re: [Web-SIG] Declaring PEP 3333 accepted (was: PEP 444 != WSGI 2.0)
by Guido van Rossum

REPLY TO AUTHOR
 
REPLY TO GROUP




On Mon, Jan 3, 2011 at 5:29 PM, P.J. Eby <pje@tele...> wrote:
> At 08:04 PM 1/3/2011 -0500, Randy Syring wrote:
>>
>> In the server/gateway example, there is a comment in the code that says:
>>
>> # TODO: this needs to be binary on Py3
>>
>> The "TODO" part confuses me.  In other areas of the PEP, there are
>> comments like:
>>
>> # call must be byte-safe on Py3
>>
>> which make sense.  But is the TODO meant to be a TODO for the PEP or is it
>> meant to be a note to the person running the example on Py3.  If the latter,
>> maybe "TODO" isn't the best prefix.
>>
>> FWIW, don't consider this an objection, it is just a question I had as I
>> read through the PEP.
>
> Those are my TODO's for the PEP itself, and I've fixed a couple of them in
> SVN (probably around the time you were writing the above).  If somebody can
> point me to the proper Py3 incantation for writing bytes to stdout, I'll fix
> the one remaining TODO marker as well.

Would

  sys.stdout.buffer.write(b'abc')

do?

(If you mix this with writing strings to sys.stdout directly, you may
have to call sys.stdout.flush() first.)

--
--Guido van Rossum (python.org/~guido)
_______________________________________________
Web-SIG mailing list
Web-SIG@pyth...
Web SIG: http://www.python.org/sigs/web-sig
Unsubscribe: http://mail.python.org/mailman/options/web-sig/subscriber%40opensubscriber.com

Bookmark with:

Delicious   Digg   reddit   Facebook   StumbleUpon

Related Messages

opensubscriber is not affiliated with the authors of this message nor responsible for its content.