[Web-SIG] PEP 444 Goals

P.J. Eby pje at telecommunity.com
Sat Jan 8 05:34:09 CET 2011


At 01:22 PM 1/7/2011 -0800, Alice Bevan­McGregor wrote:
>On 2011-01-07 08:28:15 -0800, P.J. Eby said:
>>At 01:17 AM 1/7/2011 -0800, Alice Bevan­McGregor wrote:
>>>On 2011-01-06 20:18:12 -0800, P.J. Eby said:
>>>>>:: Reduction of re-implementation / NIH syndrome 
>>>>>by>>>incorporating>the most common (1%) of features most 
>>>>>often>>>relegated to middleware>or functional helpers.
>>>>Note that nearly every application-friendly feature you add 
>>>>will>>increase the burden on both server developers and 
>>>>middleware>>developers, which ironically means that application 
>>>>developers>>actually end up with fewer options.
>>>Some things shouldn't have multiple options in the first place.  ;)
>>I meant that if a server doesn't implement the spec because of 
>>arequired feature, then the app developer doesn't have the option 
>>of using that feature anyway -- meaning that adding the feature to 
>>the spec didn't really help.
>
>I truly can not worry about non-conformant applications, middleware, 
>or servers and still keep my hair.

I said "if a server doesn't implement the *spec*", meaning, they 
choose not to support PEP 444 *at all*, not that they skip providing 
the feature.


>>Easy enough to write quick, say, 10-line utility functions that 
>>arecorrect middleware -- so that you could actually build 
>>yourapplication out of WSGI functions calling other WSGI-based functions.
>>The yielding thing wouldn't work for that at all.
>
>Handling a possible generator isn't that difficult.

That it's difficult at all means removes degree-of-difficulty as a 
strong motivation to switch.


>>So, in order to know what type each CGI variable is, you'll need a reference?
>
>Reference?  Re-read what I wrote.  Only URI-specific values utilize 
>an encoding reference variable in the environment; that's four 
>values out of the entire environ.  There is one, clearly defined 
>bytes value.  The rest are native strings, decoded using 
>latin1/iso-8859-1/"str-in-unicode" where native strings are unicode.

IOW, there are six specific facts someone needs to remember in order 
to know the type of a given CGI variable, over and above the mere 
fact that it's a CGI variable.  Hence, "reference".



More information about the Web-SIG mailing list