Armin Ronacher <armin.ronacher <at> active-4.com> writes:
I tried my best but obviously it was not good enough to please everybody. In all honesty I did not expect that such a small change would spawn such a great discussion. After all what we're discussing here is the introduction of one letter to literals
The objections are not to the introduction of one letter to literals. It is the extent to which, in your presentation of the PEP, a narrow set of concerns and a specific addressing of those concerns has been represented as if it is the only possible view of all right-thinking people in the Python community. What is "obvious" to you may not be so to others - au contraire. A PEP author obviously will promote their specific views - it is an instrument of advocacy - but an author should not, in my view, arrogate to themselves the presumption of speaking for everyone in the community; rather, they should respect that others may have different sensibilities. The PEP comes across as being primarily motivated by WSGI concerns: Nick mentioned that he would update the PEP to "name drop" and indicate support from you, Jacob Kaplan-Moss and Chris McDonough - all authors of Web frameworks. While I completely acknowledge the importance and ubiquity of these web frameworks in the overall ecosystem, I think Python the language is about more than just Web development. There is a bit of a sense of the tail wagging the dog. Let's remember, it's possible to do Web development without the concept of "native" strings - this doesn't exist AFAIK in many other languages which allow Web applications to be developed - the concept is a sort of historical accident arising in part out of how the WSGI spec was written and evolved, interacting with how 3.x differs from 2.x, and how some legacy APIs expect native strings because they are broken. There are a number of possible ways of addressing the concerns which motivated the PEP, but in my view you have given some of them short shrift because of what come across as personal prejudices. An example - on a Reddit thread about PEP 414, I commented: "The PEP does not (for example) consider the possibility of leaving literals as they are and using a n('xxx') callable for native strings. Since there are very few places where native strings are needed, this approach is potentially less obtrusive than either u'xxx' or u('xxx')." Your response to this was: "Because in all honesty, because string wrappers make a codebase horrible to work with. I will have to continue maintaining 2.x versions for at least another four or five years. The idea if having to use string wrappers for that long makes me puke." I know that this was just a comment on Reddit and was not in the PEP, but it smacks of you throwing all your toys out of the pram. It certainly wasn't a reasoned response to my point. And some of that toys-pram attitude bleeds through into the language of the PEP, leading others to make the criticisms that they have. A PEP is supposed to be balanced, reasonable and thought through. It's not supposed to gloss over things in a hand-wavy sort of way - there's still uncertainty in my mind, for example, whether the 3.2 hook will be a 2to3-style tool that runs over a chunk of the whole project's codebase between editing and running a test, or whether it's an import-time hook which only kicks in on files that have just been edited in a development session. Which of these it is might affect crucially the experience of someone wanting to support 3.2 and 3.3 and 2.6+ - but that clearly isn't you, and you don't seem to have much sympathy or patience with that constituency - we're all stick-in-the-muds who want to work with Ubuntu LTS, rather than people subject to constraints imposed by employers, clients, projects we depend on etc. In contrast, Nick made a more reasonable case when commenting ion my preference for unicode_literals (on this list, not on Reddit), by reminding me about how unicode_literals changes the semantics of string literals, and this increases the cognitive burden on developers. I'm not whinging about the PEP in this post - I've said elsewhere that I wasn't opposed to it. I'm just trying to respond to your apparent bewilderment at some of the reaction to the PEP. I have confidence that with your continued input and Nick's input, the wording of the PEP can be made such that it doesn't ruffle quite so many feathers. I'm looking forward to seeing the updates. Regards, Vinay Sajip