Message126471
This code:
assert type(val) is StringType,"Header values must be strings"
(from here http://svn.python.org/view/python/tags/r271/Lib/wsgiref/handlers.py?revision=86833&view=markup)
from "start_response" method, is not allowing to use str subclasses objects as header value.
Usecase:
I made class URL which subclasses str and has additional methods to manipulate query string. It is very handy. But when I need to set header
"Location" with URL object as value I get assertion error.
Can't we do this instead:
assert isinstance(val, str),"Header values must be strings" |
|
Date |
User |
Action |
Args |
2011-01-18 17:29:24 | riffm | set | recipients:
+ riffm |
2011-01-18 17:29:24 | riffm | set | messageid: <1295371764.49.0.785710350986.issue10935@psf.upfronthosting.co.za> |
2011-01-18 17:29:19 | riffm | link | issue10935 messages |
2011-01-18 17:29:19 | riffm | create | |
|