Re: Re: String prefix question

2009-11-09 Thread Alan Harris-Reid
Benjamin Kaplan wrote: On Sun, Nov 8, 2009 at 9:38 PM, Alan Harris-Reid wrote: In the Python.org 3.1 documentation (section 20.4.6), there is a simple "Hello World" WSGI application which includes the following method... def hello_world_app(environ, start_response): status ='200 OK' # HTTP

Re: Re: String prefix question

2009-11-09 Thread Alan Harris-Reid
Gerard Flanagan wrote: Alan Harris-Reid wrote: In the Python.org 3.1 documentation (section 20.4.6), there is a simple “Hello World” WSGI application which includes the following method... def hello_world_app(environ, start_response): status ='200 OK' # HTTP Status headers =(b'Content-type',

Re: String prefix question

2009-11-09 Thread Gerard Flanagan
Alan Harris-Reid wrote: In the Python.org 3.1 documentation (section 20.4.6), there is a simple “Hello World” WSGI application which includes the following method... def hello_world_app(environ, start_response): status = b'200 OK' # HTTP Status headers = [(b'Content-type', b'text/plain; charset

Re: String prefix question

2009-11-09 Thread Ben Finney
Alan Harris-Reid writes: > From what I can gather from the documentation the b prefix represents > a bytes literal Yes. In Python 3 there are two types with similar-looking literal syntax: ‘str’ and ‘bytes’. The types are mutually incompatible (though they can be explicitly converted). http

Re: String prefix question

2009-11-08 Thread Benjamin Kaplan
On Sun, Nov 8, 2009 at 9:38 PM, Alan Harris-Reid wrote: > In the Python.org 3.1 documentation (section 20.4.6), there is a simple > “Hello World” WSGI application which includes the following method... > > def hello_world_app(environ, start_response): > status = b'200 OK' # HTTP Status > headers =

String prefix question

2009-11-08 Thread Alan Harris-Reid
In the Python.org 3.1 documentation (section 20.4.6), there is a simple “Hello World” WSGI application which includes the following method... def hello_world_app(environ, start_response): status = b'200 OK' # HTTP Status headers = [(b'Content-type', b'text/plain; charset=utf-8')] # HTTP Headers